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

Save as PDF using Distill! method - Powerbuilder 10 .

498 views
Skip to first unread message

Carol Burrows

unread,
Dec 8, 2005, 11:02:43 AM12/8/05
to
I've read all the posts about Saveas PDF, but I'm still having problems.

I have been trying unsuccessfully to use the Distill method to save as PDF.
I'm using PB10.2.1 build 8035. Windows XP.

1. I installed the Ghostscript drivers in the default location of c:\gs

2. Here's my code:

ls_result = astr_parms.datawindow_arg[1].Modify(
"Datawindow.Export.PDF.Method = Distill!" )
ls_result =
astr_parms.datawindow_arg[1].Modify("Datawindow.Printer='Sybase Datawindow
PS'" )
ll_result = astr_parms.datawindow_arg[1].Saveas( ls_path, pdf! , TRUE )

The return from the Saveas is -1.

Can anyone offer any suggestions? Curiously, the XSLFOP method works for me
but since my report contains graphical controls (logos) I want to use the
Distill method.

Also, I notice that with the XSLFOP method, I am missing information if
trying to save a composite datawindow or a nested datawindow. Are there
other limitations?

Thanks,
Carol


Chris Pollach

unread,
Dec 8, 2005, 1:39:10 PM12/8/05
to
Carol;

Do you remember to:

1) Add C:\GS to you renvironment's DOS path?
2) Create an environment variable: "GS_DLL"
and map that to: "C:\gs\gs8.51\bin"

????

Regards ... Chris


"Carol Burrows" <car...@dbcsmartsoftware.com> wrote in message
news:43985923$1@forums-1-dub...

Carol Burrows

unread,
Dec 8, 2005, 2:11:18 PM12/8/05
to
I just tried your suggestions. Now I have an environment variable named
GS_DLL and I have added c:\gs to my system path. But I still get -1 on the
SaveAs function.

Thank for the idea though. Any other suggestions?

Carol

"Chris Pollach" <cpol...@travel-net.dot.com> wrote in message
news:43987dce$1@forums-1-dub...

Brad Wery

unread,
Dec 8, 2005, 2:20:07 PM12/8/05
to
Did the Sybase Datawindow PS printer get installed on your computer? Do
you have permission to save files in what ever location ls_path is
pointing to?

Brad

Chris Pollach

unread,
Dec 8, 2005, 2:23:27 PM12/8/05
to

Did you reboot your PC afterwards?


"Carol Burrows" <car...@dbcsmartsoftware.com> wrote in message

news:43988556@forums-1-dub...

Stephanie Young

unread,
Dec 8, 2005, 2:41:37 PM12/8/05
to
We ran into a problem with an application using Ghostscript where the
temporary files generated by the postscript printer driver were getting put
in a place that the user didn't have permissions to write to. I've
forgotten how PB's printer decides where to stick those files, but it seems
to me as though it was in the current directory. You try forcing a
ChangeDirectory to a directory that you're sure your user has permissions
to.

"Carol Burrows" <car...@dbcsmartsoftware.com> wrote in message

news:43988556@forums-1-dub...

Carol Burrows

unread,
Dec 14, 2005, 11:28:07 AM12/14/05
to
I did finally figure out how to do this.

We are writing to the user's temp directory that has write permissions.

I found 2 ways to make the Ghostscript work.

1. Install Ghostscript in the normal place (c:\gs) on the computer, then
REBOOT. Powerbuilder will use the windows registry to locate the dlls.

2. Create a subfolder called gs where the powerbuilder deployment kit is
located.
Within this subfolder you must have two subfolders:
gs\fonts
gs\7.0n where n is the mini version of Ghostscript.

I was trying to use this method. However, I had downloaded Ghostscript
version 8.15. Therefore I created my subfolder as gs8.15. However, it
seems that powerbuilder REQUIRES that the subfolder be a variant of gs7.0n.
By simply changing the subfolder name everything started to work.

Carol


"Brad Wery" <bradweryatagricoreunited.com> wrote in message
news:43988767@forums-1-dub...

0 new messages