Question

Over the past week I've been researching how to create PDFs using the saveas function on a datawindow. My system is: Powerbuilder 12.5.2 Windows 7 32-bit

From what I've read, some kind of PDF printer is required to create PDFs (whether its GhostScript, Sybase DataWindow PS, or something else). It's been implied that the fonts of the default printer are used to save a datawindow as a pdf.

Is this true?  Moreover, is this documented anywhere?

I've also noticed that whenever the topic of PDFs in powerbuilder comes up, the answer is almost always to install ghostscript. Is there a reason for this?

Ultimately, I'm looking for reasons that I can present to my coworkers as to the pros/cons of using Ghostscript vs. using the Sybase Datawindow PS, and some documentation (preferably sybase) to back it up.

Thanks for your help!


EDIT:

Alright, thanks for the answers guys.

I was able to get Powerbuilder to print to PDF only using the Sybase DataWindow PS printer using the Acrobat distiller, which was installed with my powerbuilder install.

When I sent out the application and the version to deployment machines I exported the printer to that machine, and the PDF files were generated fine.

From your responses, it sounds like ghostscript and adobe distiller are postscript drivers which can be used by the Sybase DataWindow PS printer to create and print pdf files.

I haven't tried GhostScript yet, but I'll see if I can give it a shot a little later.

EDIT 2: I installed GhostScript 9.14 and it worked with my installation. It gave the exact same results as the driver installed via powerbuilder 12.5.2.

Again, Thanks for your help!

Was it helpful?

Solution

When you use the DataWindow SaveAs function to save as PDF!, behind the scenes it prints to a virtual printer "Sybase Datawindow PS" which in turn is dependent on Ghostscript.

First you need to install Ghostscript, then create the printer. The installer can be found here: http://downloads.ghostscript.com/public/. Scroll to the bottom and chose one of the installers named gs***w32.exe for the version of Ghostscript you want.

I have an example that will create "Sybase Datawindow PS" in code: http://www.topwizprogramming.com/freecode_printerinstall.html

This can be tricky, on my work computer I have GS 9.00 and PB9 works but PB10 & PB10.5 don't. I am not sure why. Some version of PB may only work with certain versions of GS. I haven't verified that theory.

OTHER TIPS

Rolan,

I believe Ghostscript (or something similar, but I've never heard of or used anything other than Ghostscript) has always been required to generate pdfs from PB datawindows. Powerbuilder does not provide native support for it. Ghostscript does work pretty well though. With regards to documentation, pretty sure Sybase/SAP does not provide any, or even recognize the existence of Ghostscript. About the only documentation you'll get comes with the Ghostscript software, and if I remember correctly it ain't much. Google it and you should be able to come up with some online discussions.

Edit: It looks like there is "some" Sybase doumentation for Ghostscript at

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc37774_1150/html/apptech/BABGDBHJ.htm

Should apply to DWs in general, not just for "Web Forms users".

One heads up, I've heard that Ghostscript doesn't work so well when nested DWs are involved.

Regards,

Todd Oesterreich

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top