0

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.

Seki
  • 11,135
  • 7
  • 46
  • 70
arun
  • 13
  • 1
  • 7

3 Answers3

0

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.....

KenS
  • 30,202
  • 3
  • 34
  • 51
  • is there Any way open the saved file which is in print manager directly through the code ? – arun Apr 09 '16 at 17:05
  • I'm not certain what you mean. If you have saved the PostScript file then you can run it through Ghostscript to produce a PDF, yes. That's all the Sybase thing does. – KenS Apr 09 '16 at 18:40
  • Using Ghostscript if the official way to get PDF from a DW. The OP needs only to use carefully the correct version. – Seki Apr 11 '16 at 08:56
  • I *know* that, I still think its cheeky. – KenS Apr 11 '16 at 11:03
  • Now...I'm able to save the datawindow using XSL-FO method but it doesn't support graph nd composite datawindow.. When I use distill method to save the PDF then save as function returning -1 and zero byte file saved in virtual path :-( – arun Apr 11 '16 at 17:44
  • So you now can capture a PostScript file *before* its converted to PDF ? In that case you can at least post an example that we can look at. Put an example on DropBox or something similar and post the URL here. – KenS Apr 12 '16 at 07:11
0

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

Community
  • 1
  • 1
Seki
  • 11,135
  • 7
  • 46
  • 70
  • If you use an ancient version (8.71 is 6 years old) you won't get any support at all, bugs raised against such an old version will simply be flagged with 'upgrade;' and closed. And Sybase won't help you either from what I hear, leaving you somewhat between a rock and a hard place. – KenS Apr 11 '16 at 11:06
  • This is common sense to use recent supported software, but experience with PB shows that it is very picky on the versions of Ghostscript usable for out-of-the-box PDF production. I don't know what kind of kludges Sybase devs used to make but using a *incorrect* (read: different of theirs) version of GS cans easily fail to produce a usable result. – Seki Apr 11 '16 at 11:51
0

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!!!

arun
  • 13
  • 1
  • 7