Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Yet another printer question
Message
From
07/02/2006 13:21:52
 
 
To
07/02/2006 13:13:43
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01094274
Message ID:
01094357
Views:
13
Right. You have to re-route the printer output to a file, and then force a from feed by issuing Eject. Then the printer buffer will be empty, and you can select the new printer without a form feed.

>I did. However, that requires another SET PRINTER TO command right after the EJECT command to 'close' the printer. Otherwise, the subsequent codes will output the ? to the dump.dmp file.
>
>>Yes, if you have anything at all in the printer buffer set up by VFP, it will issue a form feed when you change to another printer. Did you try my little trick to let a file "eat" the form feed? I used it a lot in "the good old days".
>>
>>>It seems that every time VFP sees a SET PRINTER TO command it forces a form feed. And the formfeed occurs every time the program is ran.
>>>
>>>>I believe VFP tries to be smart, and sends a Form Feed every time you change printer. Anyway, there is an easy way around this.
>>>>Set printer to dump.dmp && dumo.dmp is a file
>>>>Eject && forces a Form feed
>>>>Set printer to name (cPrinter)
>>>>Erase dump.dmp
>>>>
>>>>>Hi all,
>>>>>
>>>>>Why does the printer ejects a page when I send this ESC codes to it? We are using the LQ-570e printer. But even when selecting a laser printer, a form feed still occurs.
>>>>>
>>>>>cPrinter = getprinter()
>>>>>if !empty(cPrinter)
>>>>>   set printer to name (cPrinter)
>>>>>   set printer on
>>>>>   * Change the font to COURIER
>>>>>   * This line causes the printer to issue a form feed
>>>>>   ??? chr(27)+chr(107)+'2' && ASCII ESC k n; where n=2 for Courier.
>>>>>   ? "Hello world"
>>>>>   set printer off
>>>>>   set printer to
>>>>>endif
>>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform