Corrupt PDF- Missing %PDF

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
hjohnson
Posts: 3
Joined: Wed Aug 23 2006

Corrupt PDF- Missing %PDF

Post by hjohnson »

using Version 2.08a

I've got a Foxpro app that opens an Excel Template, updates some fields then prints to a pdf file. When I run it (VFP 6.0, Excel 2002, WindowsXP) it works fine. The vfp app, excel template are then copied to another machine (vfp 6,WIN2K, Excel 2003) The PDF files are created, but when I try to open them I get an error saying that the file does not begin with '%PDF-'

Below is basics of the code that is used to create the PDF file. Any help would be appreciated.


*___________ sample VFP Code to Print ___________________
lcPrintername='Amyuni PDF Converter on LPT1:'
localPdfFile='C:\result.pdf'

oWorkbook.Sheets("Sheet1").Select
oSheet = oWorkbook.Worksheets["Sheet1"]
oSheet.Printout(,,,,m.lcPrintername,,,m.localPdfFile)


Thanks-
Hal
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

This means that on the second PC you're not printing to the PDF Converter printer but to the system default printer. The file you have is probably a PCL or Postscript file depending on what is the default printer on the other system.

What you can do is replace:
Amyuni PDF Converter on LPT1
by
Amyuni PDF Converter
and make sure Amyuni PDF Converter is correctly installed on the other system.

Different versions of Excel also do not behave exactly the same way. You should verify that you have the same version of Excel on both systems.
hjohnson
Posts: 3
Joined: Wed Aug 23 2006

Post by hjohnson »

Removing the 'on LPT1' solved the problem.

Thanks
Post Reply