Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SaveAs PDF error

560 views
Skip to first unread message

neilgarcia

unread,
Aug 6, 2007, 9:28:26 PM8/6/07
to
Hi,

I tried PB10 evaluation version and I am having problem to
make this thing to work. I just want to save the contents of
the datawindow into PDF file.

code: dw_1.saveas("c:\test1.pdf",PDF!,false)

this code always return -1. Why is that so, what could be
wrong?
any possibilities for it to return -1?

I hope to have reply soon. Thanks.
Neil

Adam Simmonds [TeamSybase]

unread,
Aug 6, 2007, 10:07:50 PM8/6/07
to
Neil
You need to install ghostscript on your machine and then copy to the
shared/powerbuilder folder. Check the installation guide, it should have
something in there on the process you need to follow.
a.

neilgarcia

unread,
Aug 6, 2007, 10:54:35 PM8/6/07
to
Thank you so much for the reply. This should save my day. By
the way, what installation guide you are referring here,
Powerbuilder installation guide or Ghostscript?
What ghostscript file should I copy to shared/powerbuilder
folder? once again, thank you very much.

Neil

Adam Simmonds [TeamSybase]

unread,
Aug 6, 2007, 11:52:28 PM8/6/07
to
Try this
http://www.sybase.com/detail?id=1026721#BABGDBHJ

7. Documentation updates and clarifications
7.1 Software components for saving DataWindows as PDF
7.1.1 Using the GNU Ghostscript distiller

Incorrect information appears in the section on page 486 of the User’s
Guide on saving the data in a DataWindow object as PDF using the distill
method, and in the section on page 731of Application Techniques on
deploying applications that use this feature. These sections incorrectly
state that GNU Ghostscript files are installed with PowerBuilder in
Sybase\Shared\PowerBuilder\gs7.05.

In order to use the SaveAs method to save data as PDF using the
distiller, or to use the Save Rows As menu item in the DataWindow
painter to save row data as PDF, you must first download and install GNU
Ghostscript on your computer as described in the procedure that follows.

Your use of GNU Ghostscript is subject to the terms and conditions of
the GNU General Public License (GPL). Please read the GPL before
installing GNU Ghostscript on your computer. A copy of the GPL is
available on the GNU Project Web server.


Save Rows As fails

To save as PDF in the DataWindow painter, select File>Save Rows As and
select PDF as the Save As type. If you do not install GNU Ghostscript
and use the default export properties, PowerBuilder displays a pop-up
window notifying you that Save Rows As failed. If you install GNU
Ghostscript and then change the name of the directory where GNU
Ghostscript is installed, Save Rows As PDF fails silently.
To install GNU Ghostscript on the PowerBuilder development computer:

Into a temporary directory on your computer, download
gs705w32.exe from the gs705 directory, or gs706w32.exe from the gs706
directory, at ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu.

You can find a list of alternative mirror sites on the
Ghostscript Web site at http://www.ghostscript.com/doc/gnu/gnu705.htm.

Run the executable file to install Ghostscript on your system.

The default installation directory is C:\gs. You can select a
different directory and/or choose to install shortcuts to the
Ghostscript console and readme file.


After installing Ghostscript, you should read the readme.htm file in the
gs7.05\doc directory to find out more about using Ghostscript and
distributing it with your application.

The Adobe PostScript drivers used in this feature are installed in
Sybase\Shared\PowerBuilder\drivers. For more information about
redistributing Adobe printer drivers, see the downloads page on the
Adobe Web site.
Location of Ghostscript files

When you save a DataWindow object as PDF using the distill method,
PowerBuilder searches in the following locations for an installation of
GNU Ghostscript:

*


The Windows registry
*


The relative path of the pbdwe90.dll file (typically
Sybase\Shared\PowerBuilder)
*


The system PATH environment variable

If GNU Ghostscript is installed using either gs705w32.exe (for
Ghostscript 7.05) or gs706w32.exe (for Ghostscript 7.06), the path is
added to the Windows registry. Therefore, you do not need to add the
gs7.0x\bin directory to the system PATH environment variable as
instructed by the Installation Guide.

neilgarcia

unread,
Aug 7, 2007, 12:57:04 AM8/7/07
to
Thanks a lot, I really appreciate your help. I made it to
work now. You saved my day. Thanks again.

Neil

Adam Simmonds [TeamSybase]

unread,
Aug 7, 2007, 1:21:23 AM8/7/07
to
No worries, glad its working.
a.
0 new messages