0
votes

I'm using PowerBuilder 12.5 nd installed ghostscript 9.19 version then I configured Sybase DataWindow PS printer using ghostscript driver.

  • I checked the registry it was pointing to the ghostscript DLL,bin and lib folders.
  • In datawindow painter window selected the PDF data export type,distill method and check the PostScript custom check box.
  • When I click save rows as in painter it is creating the PDF file with rows and also if I use dw_1.print the file was created in print manager without any issue.
  • But problem is when I use DW_1.saves("custom.pdf",PDF!,true) it is saving 0 bytes file in the file manger directory. Any suggestions?

I want save the datawindow in PDF format and it should be opened automatically because I don't want to go to print manager to print the file when I use print function.

3
I had the same problem years ago. A 0 byte file means something but I don't remember what. - Slapout
Here are some things to try stackoverflow.com/a/5159392/19072 - Slapout

3 Answers

0
votes

Save the PostScript file and then run it through Ghostscript from the command line. Likely there is some error being returned which PowerBuilder isn't telling you.

Of course, you could also ask Sybase for assistance, since they supply it. Relying on open source software for their PDF export is (it seems to me) somewhat cheeky.....

0
votes

You should use the Ghostscript that is provided with PB, using any other version is prone to fail...
For PB12.5, it is 8.71.

You can look at this other answer for further help: https://stackoverflow.com/a/15854193/317266

0
votes

1.I Installed latest ghostscript driver and Mapped it as "Sybase DataWindow PS" Postscript Printer. 2. Then I used Distill method to save the datawindow in PDF format but saveas method returns -1. 3.In the IIS Manager -> Application Pools -> select PBDOTNETAPPPOOL -> go to advanced settings -> Navigate to process model and change the identity to Networkservice from applicationpoolidentity.

After that i'm able to save the datawindow in PDF format successfully!!!