Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems sending reports to file with Generic Text Prn D
Message
From
12/05/2003 15:45:22
 
 
To
12/05/2003 15:15:16
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00787463
Message ID:
00787477
Views:
21
>I was wondering if anyone was sending reports to a file using the generic text print driver. The problem I have been running into is that some of the fields are being chopped off because it is converting to a non-true type font.
>
>Is there a way to prevent this?

The generic/text only driver sends straight ASCII text to the printer. You need to tell the printer to use a smaller font. There are two general ways to do this:

- Configure the printer so its default font is smaller (e.g. 12 or 15cpi instead of the typical default 10cpi). This can often be done on the printer's front panel. Downside is this will affect all users if the printer is shared.

- Pre-pend the appropriate control code(s) to each print job to achieve the same thing (this will be printer-specific). This, in turn can be done in a number of ways:

- use ??? to send escape sequences just prior to your print job. However this may not work properly with networked/spooled printers.

- print to a text file, then use functions like FILETOSTR() / STRTOFILE() to pre-pend the control codes to the beginning of the file, then dump the file to the spooler or printer.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform