Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set printer to command
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00055572
Message ID:
00055757
Views:
25
You could also try printing to two files on the hard drive (filelpt1.prt & filelpt2.prt??) and when you are done, issue

! copy filelpt1.prt lpt1
! copy filelpt2.prt lpt2

With this metod, you only have to change your SET PRINTER TO commands...

Joe

>>>I have an old fox pro (dos) program that prints to two separate printers. During each data entry line information is printed to LPT1 then to LPT2,it is constant switching process. Under DOS I utilized the set printer to LPT1 or set printer to LPT2. These are not common printers. They are used for roll (similar to calulator tape) and slip (slide a document into printer and header is imprinted at the top). Under foxpro 2.x,3.0, and 5.0 for windows the "set printer to" commands is shipping some printer codes with this statement and causing one printer to print an extra line between print statements. It would appear to me that is windows that is causing the problem and not foxpro. Under windows the print commands are not written directly to the printer port, they are sent throught the windows software device driver. I am using the GENERICE windows print driver. Is their a way to bypass the windows printer software device driver or any other solutions?
>>
>>Michael, if you are sending the printer codes yourself, be sure you preface each one with ??? (3 question marks). VFP will interpret this as a printer code and will bypass some of the Win95 interference.
>>
>>HTH
>>Barbara
>
>
>Have you tried low level file functions?
>EX.
>f_lpt1 = fopen('c:\lpt1.dos')
>f_lpt2 = fopen('c:\lpt2.dos')
>
>do print loop here
> =fwrite(f_lpt1,'what you want printed to lpt1')
> =fwrite(f_lpt2,'what you wanted printed to lpt2')
>enddo
>=fclose(f_lpt1)
>=fclose(f_lpt2)
>
>This works with win95 because it puts on the c:\ dirve a
>file called lpt1.dos for dos program to print to. So if you
>use these it is like printing from DOS. You will also have to
>set up your printers to print from DOS.
>
>Charles
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Reply
Map
View

Click here to load this message in the networking platform