Visual foxpro printing

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Visual foxpro printing

Postby carlos.alfaro1 » Mon Apr 15, 2013 8:17 pm

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

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

Re: Visual foxpro printing

Postby jr » Tue Apr 16, 2013 10:34 am

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
jr
Site Admin
 
Posts: 491
Joined: Sun Mar 26, 2006 12:28 pm

Re: Visual foxpro printing

Postby razzledazzle » Fri Apr 26, 2013 8:35 am

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


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest