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.
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.
The problem with ghostscript is that the drivers are not signed. This is a big issue in Windows 8, in that it will just stop the installation of the drivers. Windows 7 you were informed what was happening and allowed to install the drivers. Windows 8 just stops the install of the drivers, you can prove this by trying to create a printer with the ghostscript files.
Currently working through the HP PS drivers to try and identify a workaround for the Windows 8 operating system.
Windows 8 does allow unsigned printer drivers but you have to reboot into "advanced mode" see the procedure at the following link and select the option Disable driver signature enforcement. http://windows.microsoft.com/en-gb/windows-8/windows-startup-settings-including-safe-mode
Windows will still warn and advice against installing an unsigned driver.
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:
As a minor addition to the others, I've never had to Modify() any of the Export attributes; I just SaveAs(). My understanding is that these attributes are for trying to go non-Ghostscript routes, but I don't recall hearing of anyone successfully doing this.
To simplify your test, you might want to see if you can right click on the Preview pane in the DataWindow painter to see if there is a "Save Rows As..." option. (I don't have 10.5 installed at the moment, so I can't see if it's available in that version.) It will save you running the app, and at least test the basic functionality before getting it to run in PowerScript.
Good luck,
Terry.
Your code looks fine and is in line with my code that I just checked that does something similar. Verify that ghostscript is installed correctly.
For debugging purposes I would try using a much simpler datawindow without the bitmap background.