Creating pdf files in powerbuilder 12.1 classic on win 7
I'm trying to get the gnu ghostscript working on my win 7 (64-bit) machine.
I installed gs860w32
and, tried to saveas a pdf in a couple of different ways
dw_report.Object.DataWindow.Export.PDF.Method = Distill!
or, just as a saveas PDF!
both produced an error in adobe reader
that it couldn't open the file because, either it's not a supported file
or, it's been damaged
I've seen a lot of different suggestions on how to implement this
Any ideas? suggestions?
is there a step by step set of instructions, that will help me get this working?
Note1: new GS version and newer MS-Windows have a flaw in that they are missing the fonts needed to allow GS to work properly.
Note2: many people think that because PB is 32 bit - you need to use the 32bit version of GS. This is a misnomer.
Here is how I do it and I have GS working on W7, W8, W2008R2 and W2012 ...
1) Download the 64bit version of GS version 8.71.
- Has the missing fonts needed
- You must use a 64bit version of GS on a 64bit version of MS-Windows.
2) After installing GS v8.71, you need to create the "Sybase DataWindow PS" printer definition.
- Make sure this is a FILE based printer
- Do not use the PowerBuilder supplied .INF as listed in Bruce's link
- Make sure that you only use the .INF file supplied with GS v8.71.
It should be located in GS's "Lib" sub-folder
3) Create a System Environment variable named "GS_DLL" and map this to the GS's "BIN" Folder location.
- ie: C:\Program Files\GS\gs8.71\bin
4) Add the GS's "BIN" folder to your PC's "system path"
5) Reboot your system, then open the PB Classic IDE and then proceed to the DataBase Painter.
- Select to display any rows from a table in your DB.
- In the "Data" pane,use the RHMB and select the "save rows as" popup menu option.
- Select the file type as PDF and continue - you should now see a valid PDF file created
Note3: What ever you do with GS from now on .. never delete GS v8.71 as you need its font support.
If PDF generation is now working from following the steps from Part II, you may now upgrade GS to the current level (see note3).
a) Download the latest version of GS - say v 9.10
- make sure that you use only the 64bit version
b) follow the same installation steps as described above repeating steps #2 through 5.
- note, you will have to delete your "Sybase DataWindow PS" printer and re-add this using the same instructions I gave you but using the newer GS's .INF installation file.
At this point, your MS-Windows GS installation should good to go. Make sure that you set your PDF DataWindow's "Data Export" properties to:
Regards ... Chris