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
Corrupt PDF- Missing %PDF
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.
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.