Visual foxpro printing

About the programming interface for the virtual PDF printer driver.

Moderator: jr

carlos.alfaro1
Posts: 1
Joined: Mon Apr 15, 2013 8:03 pm

Visual foxpro printing

Post by carlos.alfaro1 »

Hello, somebody has tried to print from visual foxpro? how do I send from fox to the printer

Regards..
jr
Site Admin
Posts: 500
Joined: Sun Mar 26, 2006 12:28 pm

Re: Visual foxpro printing

Post 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
razzledazzle
Posts: 1
Joined: Fri Apr 26, 2013 8:29 am

Re: Visual foxpro printing

Post 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)
Post Reply