Page 1 of 1

Visual foxpro printing

Posted: Mon Apr 15, 2013 8:17 pm
by carlos.alfaro1
Hello, somebody has tried to print from visual foxpro? how do I send from fox to the printer

Regards..

Re: Visual foxpro printing

Posted: Tue Apr 16, 2013 10:34 am
by jr
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

Re: Visual foxpro printing

Posted: Fri Apr 26, 2013 8:35 am
by razzledazzle
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)