on 2013 Oct 16 1:20 AM
I am using window 7 x32. PowerBuilder 12.5 Classic and GhostScript 9.1w32
I am trying to update an old script (written in PB8) which used to use a Jaguar server to generate PDF documents, but for whatever reason that is no longer supported/working with PB12.5.
I have installed GhostScript 9.1 and the registry HKLM\SOFTWARE\GPL Ghostscript\9.1\GS_DLL
points to gsdll32.dll
and I have a Sybase DataWindow PS printer available
The PB Code I am using to generate the PDF is:
lstr_pdf_props.s_string[1] = "filename.pdf"
...
dw_statement.Object.DataWindow.Export.PDF.Method = Distill! dw_statement.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No"
dw_statement.SaveAs(lstr_pdf_props.s_string[1], PDF!, false
)
This completes without error and creates a C:\filename.pdf
file 3kb in size, however it is a blank page, the file opens in adobe reader but there is no writing or anything printed, just a blank white page.
Does anyone have any ides as to what might be going on here?
thanks.
Request clarification before answering.
Might be the version of ghostscript. See this post from stackovervlow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brad,
I did actually see that post in my research.
I have also tried to use the suggested 8.71 version of GhostScript. and it kept coming up with the same results.
I actually just found my own solution.
What I did was remove the Sybase DataWindow PS Printer and added a new printer using the built in adobe pdf driver, then renamed it to Sybase DataWindow PS. re-ran the application and bam! now it creates pdf documents with content.
There are still a few things I am required to iron out with it (for example I need to add Title and Author properties on the pdf file) but having the content there is definitely a good start.
Thanks for your response. It is good to know there is still an active support forum out there for PB.
Hi JA;
FWIW: That was and still IS your problem ... the "Sybase DataWindow PS" Printer definition.
You should have installed this printer from the .INF file supplied with GhostScript and no where else!
Have a look in GS's "LIB" sub-folder for the installation file. Also ... make sure that you only use the 32bit GS on W7 32bit and the 64bit GS on W7 64bit based PC's.
Regards ... Chris
What I did was remove the Sybase DataWindow PS Printer and added a new printer using the built in adobe pdf driver,
Do you mean the Adobe postscript drivers? If so, I've done the same as I get better results with them than with the ones that Sybase provided (I believe those came from Microsoft).
Hi Bruce,
Under Add a printer, I selected FILE: (Print to File). Then on the driver page: Adobe > Adobe PDF Converter.
Its either built into windows or installed with office I think.
I would suggest using the GhostScript Driver as Chris suggested. (same method but select Have Disk at the driver screen, then browse to the .inf) The only downside to that I guess is it is not Digitally Signed, so depending on the environment you may not be able to install it.
LOL ... Yes, the GS printer driver is not only more efficient in generating PDF's but a lot faster too!
Tip1: Don't forget to keep current with the GS releases as this printer driver has been updated to not only work more efficiently in generating PDF files but also render them better as well.
Tip2: For those using W7/W8 64 bit ... once you have GS working with release 8.71 (which resolves missing fonts) - do not delete this GS release as the font mappings will disappear as well! However, you can install newer GS releases on top of v8.71 and replace the "Sybase DataWindow PS" Printer definition from the newer GS releases.
This all works flawlessly if you use the right version of GhostScript.
For Win8.1, use the Ghostscript Download at www.ghostscript.com/downlo0ad/gsdnld.html
This driver has been digitally signed, so no need to go through the unsigned driver install process.
I tested this with PB 12.6, Win 8.1 (64 bit), and Ghostscript 9.19 for Windows (64 bit)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI: The proper download URL is actually .... Ghostscript: Ghostscript Downloads
I just installed GS 9.19 64bit on a Windows 7 Enterprise PC that has never had any version of GS on it. I installed Sybase DataWindow PS using the inf from the GS installation.
I have PowerBuilder 10.5 and it does not work. I tried copying gswin64.exe to gswin32.exe but that doesn't help. I even tried adding the ...\bin folder to the system path. Still no luck.
http://forums.asp.net/t/755349.aspx?Printing+from+web+server
The .DLLs are named the same so it seems like it should work. Be sure to name the printer "Sybase Datawindow PS". There is a fairly detailed troubleshooting guide in the older PB help docs. The first thing to do is try the "Save As" from within the PB datawindow. If that works, try your app.
If running a web service, web app, or service, be sure to check out my posting above.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.