Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate Adobe for Visual Foxpro 6.0

Status
Not open for further replies.

VBFOXDEV35

Programmer
Mar 26, 2001
77
US
I need to print to PDFWriter using a file name that I set programmatically - as in user does not get dialog box. Any clues??? I am using this code to access the adobe printer..

SET PRINTER TO NAME "Acrobat PDFWriter"
ACR = CreateObject("AcroExch.App")
AV1 = CreateObject("AcroExch.AVDoc")
AV2 = CreateObject("AcroExch.AVDoc")
PD1 = 0
PD2 = 0

Thanks

Arty
Software Developer
The Clayton Group
 
Arty,
You may want to start by getting and reading "wwPDF Class - printing VFP reports to Adobe Acrobat" at - it's free and a good starting place. Don't be put off by the "web" references, it works just fine in "plain old" code.

Rick
 
So does that mean the Win.ini needs to have:
[Acrobat PDFWriter]
PDFFileName=C:\TRASH\CLAY_PRT.PDF
bDocInfo=0

in the Win.ini in order for the CLASS to work. I am trying to get away with setting the INI if all possible. This application I am writing will have machines where the INI will vary, unless I am missing something. Please let me know. However this has been very helpfull. Thanks

Arty
 
To do that I would reccommend using Adobe Distiller rather than PDF writer.

Essentially it runs in the background converting PS files to PDF files... It is pretty slick, I use it for automated log dumps all the time. In VFP you send your report to a dummy post script printer. The PS printer is set up to only print to file. Adobe Distiller watches a particular folder for output and then converts new arrivels to PDF.

There have been several threads on this topic... Search for Distiller and you will find them.

Good Luck!
-Pete
 
Here are the links...

thread184-28648
thread184-33742

they also refer to another product fopr creating PDF's with a published API. That may be the way for you to go.

Enjoy :)
-Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top