Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing to a receipt printer
Message
From
13/07/2009 12:11:55
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01411942
Message ID:
01411968
Views:
50
>Have a look at Raw Print VCX Download #9556
>It worked perfectly for me.
>Regards
>Kevin

Kevin:

I tried it and have one problem:
SET PRINTER TO NAME 'Star TSP643 Raster Printer'
      Set Classlib TO "C:\VFP Utilities\RawprintVcx\RawPrint" Additive
      oPrnDev = CreateObject("PrintDev")
      oPrnDev.cPrinterName = set('printer', 3)
      oPrnDev.cDocName = "Document from Memory var"

      If oPrnDev.oOPen()
      	Mvar1 = 'cat' 
         oPrnDev.oPrintMem(MVar1)
         Mvar1 = 'dog' 
         oPrnDev.oPrintMem(MVar1)
         mvar1 =  CHR(27)  + CHR(100) + '00'
         oPrnDev.oPrintMem(MVar1)
         oPrnDev.oClose()
      Else
         * Error opening device; display error number
         MessageBox("OpenPrinter() Error: "+str(oPrnDev.nOpenError))
      ENDIF
The command
mvar1 =  CHR(27)  + CHR(100) + '00'
cuts the paper, but it cuts the paper BEFORE printing 'cat' and 'dog'!
Previous
Reply
Map
View

Click here to load this message in the networking platform