Hello, somebody has tried to print from visual foxpro? how do I send from fox to the printer
Regards..
Visual foxpro printing
Moderator: jr
Re: Visual foxpro printing
Maybe you can find a hint here:
http://www.tek-tips.com/viewthread.cfm?qid=1633942
This is the code that was used:
BZWriter = CREATEOBJECT("BullZip.PDFPrinterSettings")
WITH BZwriter
.SetValue ("output", &xToPDF)
.SetValue ('ShowSettings', 'NEVER')
.SetValue ('ConfirmOverwrite', "&qBZConfirm")
.SetValue ('ShowPDF', "&qBZShowPDF")
.WriteSettings(.T.)
ENDWITH
http://www.tek-tips.com/viewthread.cfm?qid=1633942
This is the code that was used:
BZWriter = CREATEOBJECT("BullZip.PDFPrinterSettings")
WITH BZwriter
.SetValue ("output", &xToPDF)
.SetValue ('ShowSettings', 'NEVER')
.SetValue ('ConfirmOverwrite', "&qBZConfirm")
.SetValue ('ShowPDF', "&qBZShowPDF")
.WriteSettings(.T.)
ENDWITH
-
- Posts: 1
- Joined: Fri Apr 26, 2013 8:29 am
Re: Visual foxpro printing
BZWriter = CREATEOBJECT("BullZip.PDFPrinterSettings")
WITH BZwriter
.SetValue ("output", &xToPDF)
.SetValue ('ShowSettings', 'NEVER')
.SetValue ('ConfirmOverwrite', "&qBZConfirm")
.SetValue ('ShowPDF', "&qBZShowPDF")
.WriteSettings(.T.)
ENDWITH
&&to print any file use this
wdateiname = "C:\anyfile.txt"
pdfdrucker = "Bullzip Printer Name"
PDFPrint = CREATEOBJECT("Bullzip.PdfUtil")
PDFPrint.PrintFile(wdateiname,pdfdrucker)
&&Or use this
DECLARE INTEGER ShellExecute IN shell32.DLL ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin
hndWin= 0
cAction= ""
cFileName= wdateiname
cParams= pdfdrucker
cDir= ""
nShowWin= 0
ShellExecute(hndWin,[printto],cFileName,["] + cParams + ["] ,[],nShowWin)
WITH BZwriter
.SetValue ("output", &xToPDF)
.SetValue ('ShowSettings', 'NEVER')
.SetValue ('ConfirmOverwrite', "&qBZConfirm")
.SetValue ('ShowPDF', "&qBZShowPDF")
.WriteSettings(.T.)
ENDWITH
&&to print any file use this
wdateiname = "C:\anyfile.txt"
pdfdrucker = "Bullzip Printer Name"
PDFPrint = CREATEOBJECT("Bullzip.PdfUtil")
PDFPrint.PrintFile(wdateiname,pdfdrucker)
&&Or use this
DECLARE INTEGER ShellExecute IN shell32.DLL ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin
hndWin= 0
cAction= ""
cFileName= wdateiname
cParams= pdfdrucker
cDir= ""
nShowWin= 0
ShellExecute(hndWin,[printto],cFileName,["] + cParams + ["] ,[],nShowWin)