PowerBuilder PDF Printing on 64 bit O/S


You are developing with PowerBuilder on a 64 bit Windows 7 OS. You followed the Post Installation notes in PowerBuilder’s documentation to install GhostScript and configure a PowerScript printer. You checked the Distill Method for PDF generation on your DataWindow Object Export property sheet but when you SaveAs PDF! you are getting a 0 byte document. You are at a loss to figure out what to do. Here’s some advise from the trenches to get over this little skirmish. (These instructions were tested using GhostScript v9.10)


1. Install 32 bit GhostScript to its default directory (C:\Program Files (x86)\gs). 2. Install 64 bit GhostScript to its default directory (<C:\Program Files\gs>) 3. Use regedit to modify entries to point to the 32 bit directories as detailed below


The 32 bit GhostScript install does not make any registry entry at all. PB, being a 32 bit app need to uses the 32 bit version. After installing the 64 bit version, change these two registry key values adding the ‘ (x86)’ to each reference to Program Files and changing gsdll64.dll to gsdll32.dl [HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript] [HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.10] Key GS_DLL “C:\\Program Files (x86)\\gs\\gs9.10\\bin\\gsdll32.dll (file://gs/gs9.10/bin/gsdll32.dll)” Key “GS_LIB” “C:\\Program Files (x86)\\gs\\gs9.10\\bin;C:\\Program Files (x86)\\gs\\gs9.10\\lib;C:\\Program Files (x86)\\gs\\gs9.10\\fonts” Verify your installation in PowerBuilder by doing a Rows Save As PDF for a result in the DB Painter

GhostScript Registry

GhostScript Registry


Leave a Comment