Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to get a CDI dll to work
Message
From
29/12/1999 05:57:38
 
 
To
28/12/1999 18:46:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00309328
Message ID:
00309752
Views:
62
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
Map
View

Click here to load this message in the networking platform