ChrisRChamberlain
Programmer
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]
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]