Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changes in Acrobat 6.0?????
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00801956
Message ID:
00802732
Views:
48
This message has been marked as the solution to the initial question of the thread.
>Anyone know how to name the output file name when printing to Acrobat 6.0. from within Foxpro. (Without prompting of course)
>
>It seems like they got rid of the registry entries that they used to use.

There's no PDF Writer included in Acrobat 6.0, only Distiler. To do unattended generation of PDF reports follow this steps:
- Right Click on Adobe PDF printer in the Control Panel, select Properties and Printing Preferences. On Adobe PDF Settings tab uncheck: View Adobe PDF results, Prompt for Adobe PDF filename, Do not send fonts to "Adobe PDF'.
- Generate PS file and than convert it into PDF as shown below. It could be a little bit slower than with PDF Writer but creates files are smaller.
lcPdfFileName = "..."
lcPsFileName = FORCEEXT(lcPdfFileName, "PS")
lcPdfPrinter = "Adobe PDF"
SET PRINTER TO NAME (lcPdfPrinter)
Select ReportCursor
* Generate PS file
Report Form test0 NOCONSOLE TO FILE (lcPsFileName)
* Conver PS file into PDF
loDist  = CREATEOBJECT("pdfDistiller.PDFDistiller.1")
lnResult = loDist.FileToPDF(lcPsFileName,lcPdfFileName,"")
ERASE (lcPsFileName)
ERASE (FORCEEXT(lcPdfFileName, "log"))
If lnResult <> 1 Or NOT FILE(lcPDfFileName)
	* PDF file not created
	* Do whatever
Endif
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform