hi Devrishi
try this... it uses windows API and gets rid of the ejected page.
set cons off &&before you start processing the info to print
set print to "yourfilemane" &&print it to a file for now
set print on
*insert your print stuff here
set print off
set printer to
if file("yourfilename")&&if it printed to the file...
DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
STRING @SourceFileName, ;
STRING @DestFileName, ;
INTEGER bFailIfExists
if ldmp &&a var to tell if the dm printer is local
CopyFile("yourfilename","LPT1:",0)&& print the file to your printer
else && a var holding the path you your dm printer
CopyFile("yourfilename",&dmpath,0)
endi
set cons on
else
messagebox('An error occured while trying to print...',0+48+0,'Printer Error....')
endi
*The following are valid examples of invoking CopyFile() after it was DECLARED:
*CopyFile('C:\MyFile','LPT1:',0) && LPT1:
*CopyFile('D:\Temp\MyFile','PRN:',0) && the default printer
*CopyFile('\\MyServer\MyShare\MyFile','\\SomeServer\SharedPrinter',0)
it works for me on w9x and w2k
using this, you get the bonus of not having to use a generic printer driver that will not process your printer control codes. i find that the epson fx80 driver works for all the epson printers i have ever come across as well as most other brands.
best - john
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement