I have a grid datawindow with a picture in it's background (with dimensions of an A4 page) and I would like to export both data and the picture as a (single page) PDF file. I used several combinations of the following commands but at most I got a 0-sized pdf.
//dw_1.Modify("Datawindow.Export.PDF.Method = Distill! ")
//dw_1.Modify("DataWindow.Export.PDF.Method = XSLFOP! ")
dw_1.Object.DataWindow.Export.PDF.Method = Distill!
//dw_1.Object.DataWindow.Printer = "\\prntsrvr\pr-6"
dw_1.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No"
dw_1.SaveAs("c:\dw_one.pdf", PDF!, false)
User’s guide (on page 533) says:
… the data is printed to a PostScript file and automatically distilled to PDF using GNU Ghostscript…
Installing Ghostscript
For licensing reasons, Ghostscript is not installed with PowerBuilder. You (and your users) must download and install it before you can use this technique…
Does anyone have any idea what is the procedure?
EDIT THANK YOU ALL. Installing ghostscript proved to be enough. I only cannot understand why the procedure is successful on some fellows PCs (using Method = XSLFOP!) without using ghostscript :-/
Administrative privileges are required to install the printer. We are using this setup on XP.
These instructions use an HP printer driver instead of the one supplied by Sybase. If for some reason you don't have this driver, you can download it from HP. The HP driver has the following advantages:
Needed files
Install gs860w32.exe
The printer name is case-sensitive and has to be exactly what is inside the quotes. There is no space in “DataWindow”. The easiest way to get it right is to copy from this document and paste it in.
We've got it working here. From our internal wiki:
We're using version 1.06 of the postscript driver which you can download here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With