General information
Category:
Coding, syntax & commands
Hi Terry,
I've used this utility recently. We had a few problems getting it to work, but ended up using WISE installer to set up the pdf printer.
When testing, I got the following code to work, although I wasn't using CDI.dll:
#DEFINE nofileprompt 1 && do not prompt for file name
#DEFINE usefilename 2
*// use file name set by SetDefaultFileName else use document name
#DEFINE concatenate 4 && concatenate files, do not override
#DEFINE disablecompression 8 && disable page content compression
#DEFINE embedfonts 16 && embed fonts used in the input document
*// Set default to dir containing pdf dlls etc.
SET DEFAULT TO c:\mydir
DECLARE LONG PDFDriverInit IN "PdfIntf.dll" STRING Printername
DECLARE LONG PDFDriverEnd IN "PdfIntf.dll"
DECLARE LONG SetDefaultDirectory IN "PdfIntf.dll" STRING DirName
DECLARE LONG SetDefaultFileName IN "PdfIntf.dll" STRING FileName
DECLARE LONG SetFileNameOptions IN "PdfIntf.dll" INTEGER Options
*// Now create the pdf printer driver
?pdfdriverinit("pdfprint")
?setdefaultdirectory("C:\")
?setdefaultfilename("mydoc.pdf")
?setfilenameoptions(nofileprompt + usefilename)
*// Set current printer to pdf printer
SET PRINTER TO NAME "pdfprint"
REPORT FORM c:\reportdir\myreport TO PRINTER NOCONSOLE
*// Reset default printer
SET PRINTER TO
*// Destroy the pdf printer driver
?pdfdriverend()
Please tell me how you get on.
Best.
Matt.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only