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

Converting PSR files to PDF format.

3,224 views
Skip to first unread message

Marcelo David Laginestra

unread,
May 9, 2005, 11:07:16 AM5/9/05
to
Hi,

I have the following problem.
I receive some PSR files and I need to convert them to PDF, or (Postscript
or PCL if not possible).

Is there any application that let me do the convertion in a batch mode, or
any component for Delphi, VB?

In advance, thanks a lot for any help.

Regards,
Marcelo


Boris Gasin[TeamSybase]

unread,
May 9, 2005, 12:31:54 PM5/9/05
to
On 9 May 2005 08:07:16 -0700, "Marcelo David Laginestra"
<tecno...@doctec.com.ar> wrote:

>Hi,
>
>I have the following problem.
>I receive some PSR files and I need to convert them to PDF, or (Postscript
>or PCL if not possible).
>
>Is there any application that let me do the convertion in a batch mode, or
>any component for Delphi, VB?

Marcelo,

This is a very simple application to write yourself. In PB9,10

dw_1.object = "d:\data\psr_files\dw_1.psr"
dw_1.SaveAs("d:\data\pdf_files\dw_1.pdf", PDF!, TRUE)

Or dw_1.Print() to an acrobat distiller or CutePDF / Ghostscript
printer in prior versions..

Marcelo David Laginestra

unread,
May 9, 2005, 12:53:48 PM5/9/05
to
Hi Boris,

Thanks a lot for your answer.
The fact is that I'm not a PB programmer, I just receive PSR files from a
customer and I need to convert it to PDF format.
Maybe I posted in the wrong newsgroup.
What I'm trying to find is an application that let me do that convertion, or
a component for use in a Delphi / VB application

Thanks a lot for your help.
Regards,
Marcelo

"Boris Gasin[TeamSybase]" <nospambgasinatdynamictechgroupdotcom> escribió en
el mensaje news:cm3v71dvr19onqnh4...@4ax.com...

Jason 'Bug' Fenter

unread,
May 9, 2005, 1:36:46 PM5/9/05
to
A lot of PDF tools create a "PDF Printer" to which you "print" anything
to, the result being a PDF file. What I did was to define a local
printer that prints to a file using the MS Publisher Color Printer
driver. Since I don't have MS Publisher, I can only guess that this
driver came by default with WinXP Pro. When I print to this printer, I
get prompted for a file name. I can put either a .PS or .PDF extension
to it and GSView will open the file just fine. Since I'm just printing,
it doesn't matter where the source is coming from... be it notepad or
your PSR viewer app.

HTH

Jerry Siegel

unread,
May 9, 2005, 1:38:33 PM5/9/05
to
A freeware PSR viewer is available at http://www.searer.com/

"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message
news:427f959c@forums-1-dub...

Boris Gasin[TeamSybase]

unread,
May 9, 2005, 2:23:47 PM5/9/05
to
Jerry and Jason beat me to it, and provided you with one solution.
You can download a PSR viewer application and "print" it to a PDF
file. Here is one free tool which allows you to do that.
http://www.cutepdf.com/Products/CutePDF/Writer.asp

As for doing this programatically without PB, you can purchase a
Datawindow.NET component and write a simple VB.NET application...
http://www.sybase.com/products/developmentintegration/datawindownet

The only caveat is that the PSR format may not be backwards compatible
to older PowerBuilder versions. Do you know the PB version used to
create the source app of your PSR reports?

On 9 May 2005 09:53:48 -0700, "Marcelo David Laginestra"

Marcelo David Laginestra

unread,
May 9, 2005, 2:24:18 PM5/9/05
to
Thanks a lot for your answer Jason and Jerry.

I have downloaded the PSR viewer and the ghostscript 8.0. Then I open a psr
file in the psr viewer but when I use the save as PDF option the viewer
still says that I need to download ghostscript.

Any suggestion about it.?

Thanks a lot for any help.

Regards,
Marcelo
"Jerry Siegel" <jer...@dataDASHsciDOTcom.die.spammer.die.die.die> escribió
en el mensaje news:427fa019$1@forums-1-dub...

Marcelo David Laginestra

unread,
May 9, 2005, 2:55:59 PM5/9/05
to
Thanks boris for your answer.

I have downloaded and tried with the cutePDF and works ok, do you know any
way to do this in a batch mode?:
Open a PSR file and print it with a filename .pdf. This must be done for
several psr files.

In advance, thanks a lot for your help.
Regards,
Marcelo

"Boris Gasin[TeamSybase]" <nospambgasinatdynamictechgroupdotcom> escribió en

el mensaje news:l59v71l7fkm9i2374...@4ax.com...

Jim Egan

unread,
May 9, 2005, 4:44:31 PM5/9/05
to
tecno...@doctec.com.ar wrote...

> Thanks boris for your answer.
>
> I have downloaded and tried with the cutePDF and works ok, do you know any
> way to do this in a batch mode?:
> Open a PSR file and print it with a filename .pdf. This must be done for
> several psr files.

I think you will have to have someone code that for you unless one of these freeware PSR
viewers has a batch mode.
--
Jim Egan [TeamSybase]
Sybase product enhancement requests:
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement

Marcelo David Laginestra

unread,
May 9, 2005, 5:01:51 PM5/9/05
to
Ok,. Thanks for your help Jim


"Jim Egan" <eganjp...@compuserve.com> escribió en el mensaje
news:427fcbab$1@forums-2-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 7:34:07 AM5/10/05
to
Thanks a lot Doug!!

I will try it and I let you know how it works.

Thanks again.

Regards,
Marcelo

"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> escribió en el
mensaje news:42804e7e@forums-1-dub...
> OK, take two. Found some bugs in the previously posted version. This one
> should work as described before. The main thing to remember is you must
> have Ghostscript correctly installed and the ghostscript bin directory
must
> be in your path.
>
> The first time you try and convert to a PDF it will probably fail, but it
> should work on subsequent requests. The first time you try, it fails and
> creates the windows printer "Sybase DataWindow PS" if it does not exist,
but
> after that it should work fine. Let me know if you have any problems.
>
> Doug Porter
> DailyAccess Corporation
>
>
> "Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> wrote in message
> news:427fe168@forums-1-dub...
> > Try this Marcelo.
> >
> > Here is a hacked together .exe (source files included) that takes
command
> > line parameters to either print all psr files or save as pdf all psr
> > files.
> >
> > Usage: psrconverter.exe -print c:\mydir\*.psr <-- Calls print for each
> > PSR
> > file in mydir
> > psrconverter.exe -save c:\mydir\*.psr <-- Saves each PSR file
> > in
> > mydir as filename.pdf
> >
> > If you are using the -save function, make sure that the ghostscript
files
> > are in your path.
> >
> > Writes results out to log.txt
> >
> > This was built using PB9 build 6533.
> >
> > Doug Porter
> > DailyAccess Corporation
> >
> > "Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message
> > news:427fcfbf@forums-1-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 8:16:13 AM5/10/05
to
Hey Doug

I've unzipped the files in a C:\temp\psrtopdf directory.
Then the program ask me for two files so I have copied all this files from
the psr viewer to the C:\tmep\psrtopdf directory:
libjcc.dll
pbaen90tlb
PBDWE90.DLL
pbfnt70.ini
pblab90.ini
pbrtc90.dll
pbvm90.dll

and added the D:\Progs\Eval\gs\gs8.00\bin directory to the path setting.

After execute the program with this statement:

prsconverter -save c:\temp\*.psr

I don't receive any message and I can see the log.txt file with this info:

Saving as PDF: c:\temp\69.pdf
Saving as PDF: c:\temp\70.pdf
Saving as PDF: c:\temp\71.pdf
Saving as PDF: c:\temp\72.pdf
Saving as PDF: c:\temp\73.pdf

but the files were not created, I think this is related to the ghostscript
location or version?

In advance thanks a lot for any help.

Regards,
Marcelo


"Marcelo David Laginestra" <tecno...@doctec.com.ar> escribió en el mensaje
news:42809c2f@forums-1-dub...

Chris Pollach

unread,
May 10, 2005, 8:22:32 AM5/10/05
to
Marcelo;

FYI: There are free PSR viewers on Sybase's "CodeXchange" server.

Also, the PSR to PDF is extremely easy WITHOUT any need for GhostScript or
3rd party add-ons (if you have PB 9 or higher):

1) Load PSR file ... DC.DataObject = "your.psr"
2) Change the DW object to XLS-FO format.
DC.Modify("DataWindow.Export.PDF.Method=XSLFOP!")
3) Then save the PSR as a PDF
DC.SaveAs (PDF!)

regards ... Chris


"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message

news:427f7ca0@forums-2-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 8:44:27 AM5/10/05
to
Hi Chris,

Thanks a lot for your help but I don't have the powerbuilder.
I trying to get any psrtopdf converter that can be executed in batch mode if
it is possible.


Regards,
Marcelo


"Chris Pollach" <cpol...@travel-net.dot.com> escribió en el mensaje
news:4280a783$1@forums-2-dub...

Doug Porter

unread,
May 10, 2005, 8:52:20 AM5/10/05
to
Yeah, I would say definitely GhostScript related. Do you see a printer
named "Sybase DataWindow PS" in your printer list?

Doug Porter
DailyAccess Corporation

"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message

news:4280a60d@forums-1-dub...

Chris Pollach

unread,
May 10, 2005, 8:53:29 AM5/10/05
to
No problem ... just make a PB friend you can compile the above example into
a batch EXE that you can call from any other development tool or BAT file.
Once compiled, the PB EXE file is free to distribute to anyone - you just
need a few runtime DLL's, but they are free also!


"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message

news:4280acab@forums-1-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 8:55:04 AM5/10/05
to
No Doug, I can't see that printer.

Regards,
Marcelo
"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> escribió en el

mensaje news:4280ae84@forums-1-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 8:55:05 AM5/10/05
to
Thanks again.


"Chris Pollach" <cpol...@travel-net.dot.com> escribió en el mensaje

news:4280aec9$1@forums-1-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 9:05:39 AM5/10/05
to
thanks a lot for all you help Doug.

This application is doing the same as the other one, it updates the log.txt
file but doesn't create the pdf files.

maybe some library from PB is needed?

In advance thanks a lot for your help.

"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> escribió en el
mensaje news:4280b066@forums-1-dub...
> In awe as always Chris. Try this one Marcelo, it uses Chris's method of
> PDF, hopefully alleviates the GhostScript pain.
>
> Doug Porter
> DailyAccess Corporation
>
>
> "Chris Pollach" <cpol...@travel-net.dot.com> wrote in message
> news:4280aec9$1@forums-1-dub...

Doug Porter

unread,
May 10, 2005, 9:37:28 AM5/10/05
to
Anyone know which files are needed for this? I know there is a fop related
folder under the PowerBuilder/Shared directory that probably has something
to do with using this.

Doug Porter
DailyAccess Corporation

"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message

news:4280b1a3@forums-1-dub...

Doug Porter

unread,
May 10, 2005, 9:44:14 AM5/10/05
to
From the Application Techniques guide page 732:
----------------------------------------------------------------------------
----
Using the Apache FO processor

If your application uses the Apache processor to save as PDF or XSL-FO, you
must deploy the fop-0.20.4 directory and the Java Runtime Environment (JRE)
with your application. These directories are available in zip files in the
Support
directory on the CD.

They must be deployed in the same directory as the PowerBuilder runtime
files. For example, if you deploy your application and pbvm90.dll and the
other
PowerBuilder runtime files in a directory called MyApplication, the Apache
processor and the JRE must be deployed in MyApplication/fop-0.20.4 and
MyApplication/jre. However, you do not need to place a copy of the JRE in
this
location if the full JDK is installed on the target computer and is in the
classpath.

For more information about the JRE, see "Java support" on page 728.
On Windows DBCS platforms, you also need to deploy a file that supports
DBCS characters to the Windows font directory on the target computer, for
example C:\WINNT\fonts. For more information about configuring fonts, see
the Apache Web site at http://xml.apache.org/fop/fonts.html.
----------------------------------------------------------------------------
----

Doug Porter
DailyAccess Corporation

"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> wrote in message

news:4280b918@forums-1-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 1:06:35 PM5/10/05
to
Thanks for the help.

I have downloaded the FOP and created the following directory:
C:\Temp\psrtopdf2\fop-0.20.5
and added that path to the windows path environment variable.

But still not working.

Thanks again for any help.
Regards,
Marcelo


"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> escribió en el

mensaje news:4280baae$1@forums-1-dub...

Doug Porter

unread,
May 10, 2005, 1:32:44 PM5/10/05
to
What about a Java runtime (should be installed to C:\Temp\psrtopdf2\jre) ?
I'm also not sure if it specifically needs fop-0.20.4 or if .5 will work
just as well..

Doug Porter
DailyAccess Corporation

"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message

news:4280ea1b$1@forums-1-dub...

Chris Pollach

unread,
May 10, 2005, 2:20:08 PM5/10/05
to
Doug;

Just copy the files below from the "C:\Program
Files\Sybase10\Shared\PowerBuilder\fop-0.20.4" sub-folder over to Marcelo.
Then make sure he adds their location to the classpath on his machine:

The following JAR files must be in the user's classpath:

a.. fop-0.20.4\build\fop.jar
b.. fop-0.20.4\lib\batik.jar
c.. fop-0.20.4\lib\xalan-2.3.1.jar
d.. fop-0.20.4\lib\xercesImpl-2.1.0.jar
e.. fop-0.20.4\lib\xml-apis.jar
f.. fop-0.20.4\lib\avalon-framework-cvs-20020315.jar
Regards ... Chris


"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> wrote in message

news:4280baae$1@forums-1-dub...

Doug Porter

unread,
May 10, 2005, 3:17:31 PM5/10/05
to
Sounds good. I just e-mailed the files to you Marcelo. It was 5Mb, so
hopefully your e-mail doesn't reject the attachment.

Doug Porter
DailyAccess Corporation

"Chris Pollach" <cpol...@travel-net.dot.com> wrote in message

news:4280fb4d$1@forums-2-dub...

Marcelo David Laginestra

unread,
May 10, 2005, 3:51:56 PM5/10/05
to
Hey Doug,

I just received your files.
I have set the classpath to the fop-0.20.4\build\ and fop-0.20.4\lib
directories but still not working.
My pc has the Java 2 Runtime Environment SE v1.4.1_01 installed but the jre
paths doesn't appear in the classpath or path environment variables.
so I will try to add it.

Thanks again for the help.

"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> escribió en el

mensaje news:428108c5$1@forums-2-dub...

M. Searer

unread,
May 11, 2005, 2:10:31 PM5/11/05
to
Did you install the ghostscript?

"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message

news:427faad2@forums-1-dub...

M. Searer

unread,
May 11, 2005, 2:13:08 PM5/11/05
to
This is the problem with Sybase's 'solution' to a saveas psr. Unless a company
has an IT staff to install the ghostscript, it just causes problems.

"Marcelo David Laginestra" <tecno...@doctec.com.ar> wrote in message

news:427f7ca0@forums-2-dub...


> Hi,
>
> I have the following problem.
> I receive some PSR files and I need to convert them to PDF, or (Postscript
> or PCL if not possible).
>
> Is there any application that let me do the convertion in a batch mode, or
> any component for Delphi, VB?
>

> In advance, thanks a lot for any help.
>
> Regards,
> Marcelo
>
>


Marcelo David Laginestra

unread,
May 12, 2005, 7:47:22 AM5/12/05
to
I think I have installed correctly, but it's not working yet.

Regards,
Marcelo

"M. Searer" <nos...@nospam.com> escribió en el mensaje
news:42824b34$1@forums-1-dub...

Marcelo David Laginestra

unread,
May 12, 2005, 7:47:22 AM5/12/05
to
Yes, I have installed the gs version 8.00.

Regards,
Marcelo

"M. Searer" <nos...@nospam.com> escribió en el mensaje
news:42824a97$1@forums-1-dub...

Marcelo David Laginestra

unread,
May 13, 2005, 8:39:15 AM5/13/05
to
I just must let my boss know that this convertion from psr to pdf can be do
it.
So maybe I'll go back with this issue shortly when the project comes out.

Thanks for the help.
Marcelo

"Marcelo David Laginestra" <tecno...@doctec.com.ar> escribió en el mensaje
news:4283424a$2@forums-1-dub...

migs8.vi...@gmail.com

unread,
Oct 5, 2018, 3:54:08 AM10/5/18
to
Hi Im trying to sendblast a PDF file using my gmail account. It is automated via payroll system, but unfortunately when i tried to email blast the pdf it was converted to .psr. Why did that happened?

labe...@gmail.com

unread,
Aug 20, 2019, 7:40:31 AM8/20/19
to
0 new messages