Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing using printer codes to GDI printers?
Message
From
09/04/2002 13:01:09
 
 
To
09/04/2002 10:23:25
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00642572
Message ID:
00642770
Views:
13
Duh, never mind. I completely forgot about the pre tag!
Any idea how I can prevent the filename in the lower left corner as well as the page number and dates from printing? Also, when using the pre tag, you have no control over what font is used -- the default is a Courier-style typeface, and you cannot change it. It let me change the font size, but not the vertical height. I need to shorten the vertical height too when the font size is smaller. Any idea how to do that?

>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
Reply
Map
View

Click here to load this message in the networking platform