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:33:46
 
 
To
09/04/2002 10:23:25
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00642572
Message ID:
00642670
Views:
18
This sounds like an idea, however, there are printer codes all through these reports. There is bold, condensed, standard, etc in many places in every report. Also, we originally supported all printers in the FPD26 prntcodes.dbf (that's where we grabbed the codes from) so I would have to be able to allow for that. Or, in all of the report prgs where I grab the codes from the prntcode table, I could issue the html codes instead. I'll have to play with it some. It would still require editing hundreds of prgs though which is probably almost as time consuming as redoing the reports. I'm going to test a couple and see how it works and the time involved. Thanks for the idea Daniel!
:o)
Tracy

>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
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform