0

I am using window 7 x32. PowerBuilder 12.5 Classic and GhostScript 9.1w32

I am trying to update an old script 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 (using windows HP driver as per this post)

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.

Community
  • 1
  • 1
Jake
  • 1,207
  • 2
  • 28
  • 46

3 Answers3

1

There is a Microsoft Group Policy setting that will interfere with the use of Ghost Script for the print to PDF function.

It is called "Block the Installation of kernel-mode printer drivers".

To correct/check if it is set, go to:

  1. Open group policy (gpedit) If your network admin group owns it you will need to get with them.
  2. Under Local Computer Policy, double-click Computer Configuration.
  3. Double-Click Administrative Templates, and then double-click printers.
  4. Right-click "Disallow installation of printers using kernel mode drivers", and then click properties.
  5. On the Setting tab, click disable, and then ok. (You want to disable this feature for Ghost Script to work).

If your network security folks have gotten carried away, this will kill your efforts no matter what you may try to do.

Hope this helps.

Smooth Sailing.

0

i think you have the wrong version of GhostScript. See my answer here:

PowerBuilder 12.5 Classic PDF SaveAs creating files of 0 size on Win7 x64

Br. Gábor

Community
  • 1
  • 1
DARKinVADER
  • 640
  • 3
  • 11
  • Uninstalled and re-installed 8.71 as per your post.. still doing the same thing.. it is not creating an 0kb unopenable file it is creating a 3kb functioning blank white page pdf – Jake Oct 15 '13 at 23:45
0

When I swapped to using GhostScript 8.71 the same results were occurring.

What I ended up doing was deleting the Sybase DataWindow PS printer and adding a new printer using the built in Adobe PDF driver. then naming it to Sybase DataWindow PS. It's not perfect. But it does now print content onto the page not just white. (Using GhostScript 8.71 have not tested with 9.1)

Jake
  • 1,207
  • 2
  • 28
  • 46