Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing using printer codes to GDI printers?
Message
From
09/04/2002 10:23:25
 
 
To
09/04/2002 08:09:58
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00642572
Message ID:
00642661
Views:
20
Tracy,

I'm not sure if this is an option. But maybe you could create a wrapper that consists of redirecting the output into a text file rather than directly to the printer and post-process the generated text file in order to replace the printer codes with your own formatting. You could use HTML, RTF or even Word automation to format and print the documents.

Something like the following (pseudo code):
*-- post processing
SET PRINTER TO someFile

*-- call your standard report PRG
DO LegacyReportPrg

*-- post processing in order to replace the printer codes with
*-- some other formatting (e.g. HTML)

lcReport = FILETOSTR(someFile)
*-- replace PCL printer codes with corresponding HTML tags
lcReport = STRTRAN(lcReport, "(s3B", "<b>")
lcReport = STRTRAN(lcReport, "(s0B", "</b>")
etc.

*-- write string back to file
STRTOFILE(lcReport, someFile)

*-- print file
ShellExecute(someFile, "Print")
HTH
>We have a huge app that is in the process of being completely converted to VFP7. In the meantime, while hundreds of reports have been redone using the report writer, there are still hundreds of reports that are printed via either ?? or @...say and of course condensed printing is set using ??? in those cases. In almost all cases, these reports still print. However, some of our customers now have low-end GDI printers like the Epson C40UX or Lexmark Z43 color inkjet that came with their new pcs when they upgraded. Is there anyway (quickly) to get these reports to still print while we continue the process of converting them? It will take some time to complete the process, but the customers still need to print the remaining reports as is. Any ideas? The reports are scattered amongst hundreds of prgs so the process is slow and time-consuming converting each one.
>
>Tracy
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform