Saving data to PDF in PB 10.5

I have a grid data window with a picture on it (with A4 page size), and I would like to export both the data and the image as a file (one page) PDF. I used several combinations of the following commands, but at best I got a pdf file of size 0.

//dw_1.Modify("Datawindow.Export.PDF.Method = Distill! ") //dw_1.Modify("DataWindow.Export.PDF.Method = XSLFOP! ") dw_1.Object.DataWindow.Export.PDF.Method = Distill! //dw_1.Object.DataWindow.Printer = "\\prntsrvr\pr-6" dw_1.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No" dw_1.SaveAs("c:\dw_one.pdf", PDF!, false) 

The user manual (on page 533) says:

… the data is printed to a PostScript file and automatically distilled to PDF using GNU Ghostscript…

Installing Ghostscript

For licensing reasons, Ghostscript is not installed with PowerBuilder. You (and your users) must download and install it before you can use this technique…

Does anyone know what a procedure is?

CHANGE THANKS TO YOU ALL. Just install ghostscript. I can’t understand why the procedure is executed on some personal computers (using the = XSLFOP method!) Without using ghostscript: - /

+7
pdf powerbuilder datawindow
source share
6 answers

Configure Ghostscript and Printer for PowerBuilder

Administrative privileges are required to install the printer. We use this setting on XP.

These instructions use the HP printer driver, not the one provided by Sybase. If for some reason you do not have this driver, you can download it from HP. The HP driver has the following advantages:

  • Generated PDF files can be read using Screen Reader (YMMV, but Sybase driver output is not readable at all.)
  • The driver is digitally signed for installation on systems that require signed drivers.

Required Files

  • gs860w32.exe from http://pages.cs.wisc.edu/~ghost/ (you can try a later version if you want. 8.60 works great for us.)
  • Driver files in the folders C: \ Program Files \ Sybase \ Shared \ PowerBuilder \ (the path may vary depending on the installation)

Ghostscript

Install gs860w32.exe

  • Install in C: \ Program Files \ gs
  • Check all users
  • Check Ghostscript Font Installation

Sybase DataWindow PS Printer

The printer name is case sensitive and must be exactly what is inside quotation marks. There is no space in the "DataWindow". The easiest way Is it correct to copy from this document and paste it.

  • Open control panel, printers and faxes
  • Select "Add Printer" (hereinafter)
  • Select "Local printer", uncheck "Automatically detect and install my Plug and Play printer" (hereinafter)
  • Select Use the following port, select FILE: (next)
  • In the left list, select "HP" for the manufacturer.
  • In the right list, scroll down and select "HP 8150 Series PS" (hereinafter)
  • Printer Name "Sybase DataWindow PS"
  • Use as the default printer, select No (next)
  • Leave Do not share selected (hereinafter)
  • Print a test page, select No (next)
  • (ending)
+10
source share

It works here. From our internal wiki:

  • Install ghostscript on your workstation (8.50 or 8.15 recommended)
  • Make sure the ghostscript files in the Powerbuilder dll directory
  • Make sure there is a directory in the same place that contains the default postscript for the drivers supplied by Sybase.
  • Powerbuilder uses the Adobe Postscript Driver (which can be downloaded for free from Adobe.com). It should be called 'Adobe DataWindow PS'

We are using version 1.06 of the postscript driver, which you can download here:

+4
source share

Your code looks great and matches my code I just checked, something similar. Make sure ghostscript is installed correctly.

For debugging purposes, I would try to use a much simpler datawindow without a raster background.

+4
source share

As a minor addition to the others, I never had to modify () any of the Export attributes; I am just SaveAs (). I understand that these attributes are for non-Ghostscript route lookups, but I don’t remember anyone successfully doing this.

To simplify the test, you can see if you can right-click on the Preview panel in Illustrator DataWindow to see if there is an option "Save rows as ...". (I don’t have 10.5 at the moment, so I can’t figure out if this is available in this version.) This will save you from launching the application and at least checking the basic functions before running it in PowerScript.

Good luck

Terry.

+3
source share

The problem with ghostscript is that the drivers are not signed. This is a big problem in Windows 8 because it just stops installing drivers. Windows 7 has been told what is happening and you are allowed to install drivers. Windows 8 just stops installing drivers, you can prove it by trying to create a printer with ghostscript files.

He is currently working through the HP PS drivers to try and determine a workaround for the Windows 8 operating system.

0
source share

Unsigned printer drivers are allowed in Windows 8, but you need to reboot into "advanced mode", see the procedure at the following link and select the option "Disable force signature matching". http://windows.microsoft.com/en-gb/windows-8/windows-startup-settings-including-safe-mode

Windows will still warn and advise against installing an unsigned driver.

0
source share

All Articles