I have an application built in 10.5 that was able to successfully create PDFs using SaveAs on Windows XP. When I moved to Windows 7 (32-bit), it failed by returning -1 and a ze
When I saw your question, I realized the laptop I was currently using wasn't producing PDFs. Here's what I tried, flailing included:
Had all that failed, I probably would have been down to using Process Monitor to try to figure out where the connections weren't being made. (PB uses printer driver to create a PostScript, .ps, file, which GhostScript processes.)
There's probably no way to tell if what I just experienced has any bearing on your situation, but maybe it will help. The Sybase newsgroups are full of people telling their stories to others that are having problems; this integration is probably the most problematic PB has.
Good luck,
Terry.
Response to 2-MAR-2011 Addendum
Yikes. OK, so I'm not entirely sure what ghostpdf.inf is supposed to do (my guess is that it wants to create a PDF directly), but it's not what's recommended. What you want is a printer driver that will produce a PostScript file, like "HP Color LaserJet PS" recommended in the manuals, pointed to File: port, and renamed to "Sybase DataWindow PS". Renaming the printer created by the installation of the Adobe printer driver would have sufficed as well.
My answer is maybe as simple as it can get. I have been doing a lot of attempts to get this working with all of the recent versions of Ghostscript. The solution that finally got it working was just to use GhostScript 8.70, not any other version and to use the ghostpdf.inf file from this version. For one reason or another, I can't explain why, this seems to work...
We are using Powerbuilder 11.5 and ghostscript worked fine on Windows XP.
When we moved PB 11.5 to Windows 7 64 bit, tried everything and finally called Sybase Tech Support. This works, even from PowerScript. Note that PB 11.5 is not supported for Windows 7 but the tech was gracious. PB 12.5 is supported on Windows 7.
On Windows 7 64 bit there is an open CR, 710061, (bug report) that the 64 bit Ghostscript does not work with PB 12 or 12.5. This bug has been open since the end of May and has not yet been fixed in any version. As PB 11.5 is no longer under support, it would not be fixed in that version when this is addressed.
I just downloaded the latest version of Ghostscript, 9.06 64 bit and following the workaround below it is now working for me. I tested this with PB 12.5 but it should be the same for PB 11.5.
CR 710061 - SavesAs PDF does not work with ghostscript 9 on 64-bit Windows 7
PowerBuilder 12.1 and 12.5 Windows 7 64-bit Windows 2008 64-bit GhostScript 9.x 64-bit
When trying to save rows as PDF using ghostscript 9 failed on 64 bit Windows. There might be several issues including security issues.
With the 64-bit version of GhostScript the application is named gswin64c.exe instead of gswin32c.exe. PowerBuilder looks for gswin32c.exe and not for gswin64c.exe
As work-around on 64-bit Windows 7 I was also able to get it to work with the 64-bit version of the gs905 driver through:
For 32 bit operating systems, the ghostscript 32 bit versions should work as documented in the manuals. Link is below.
http://infocenter.sybase.com/help/topic/com.sybase.dc37774_1150/html/apptech/BABGDBHJ.htm
I feel your pain. I went thru this whole thing a year ago.
The way it works is that PowerBuilder sends its output to the printer driver. The printer driver outputs a postscript (.ps) file. Ghostscript takes this file and outputs a PDF file. If you're getting a 0 byte PDF, it may be that something is wrong with your Ghostscript setup.
Things to check:
The registry entries (I think) should be something like this: HKLM\SOFTWARE\GPL Ghostscript\8.63 GS_DLL should point to gsdll32.dll (probably in your ghostscript bin folder) GS_LIB is a list of paths (lib, font, resource)