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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REPORT FORM to PDF files

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
The advantages of Adobe PDF files are well documented, and need no extolling here. For FoxPro developers they have further benefits in that reports in PDF format can be saved for future reference, and offer a better preview/print facility.

Conventionally they would be created by converting a report that has been printed to a postscript file into a PDF file by using an Adobe or similar product. Inevitably this has cost implications for distributed applications, and may simply be unaffordable.

One freeware alternative, (does require commercial licences), is GhostScript, available at
For simplicity in the following code, the RUN command is used, but in practice, WinAPI calls would be made. The paths have also been omitted.

SET PRINTER TO NAME [PDF Creator] && Postscript driver printing to file
REPORT FORM report1 NOCONSOLE TO FILE output.ps
! /N2 C:\Aladdin\gs6.01\bin\gswin32c.exe -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -c save pop -sOutputFile='output.pdf' -f output.ps
! /N1 "C:\Program Files\Adobe\Acrobat 4.0\Reader\AcroRd32.exe" output.pdf

The question is does anyone have the correct arguments for the GhostScript command line?

The existing arguments are not correct.

TIA

Chris [sig][/sig]
 
Check this site out. Print directly to a pdf and skip all the middle steps.
[sig]<p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top