Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with PRINT2PDF
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01010796
Message ID:
01010901
Views:
25
Hi,

The error message states that GhostScript cannot create the PDF file, not that it cannot open the PS, but perhaps that is why it fails, although I can't imagine why. PRINT2PDF, as you know, creates a .PS with a unique file name derived from a sys(2015) call in the MAKEPS method. And it retains this name in the variable lcPSFile which in turn is passed to the GSConvertFile function as tcFileOut. The lcParms variable is built with the value of tcFileOut along with whatever else it needs to make Ghostscript happy. lcParms together with lcProg then creates lcCmd which is used in the ShellExecute call. Through the debugger, I have confirmed that these variables a correct prior to the call to SHELLEXECUTE. As previously stated, using GSVIEW, I can open the .ps that was just created and it appears fine.

I noticed in the comments that Paul refers to previously using a call to your GS.DLL but has since modified the code to use the SHELLEXECUTE instead. Do you think using the GS.DLL may make a difference? If so, where can I get it and what is the correct calling method?

As I understand the workings of PRINT2PDF, one of the first things it does is save my current printer settings before it then sets it to the Postscript driver and upon exit, restores my original settings. I haven't changed anything in PRINT2PDF, so I don't believe that to be the issue.

Vince
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform