f



convert from PDF to postscript

We are creating PDF files in our application and storing them, but we must
also print them. I have it narrowed down to executing LPR from the
application. Sample postscript files printed OK with this command, so I need
to convert PDF files to postscript. I've been looking for something to do
this and can't find it. I found such things as a2ps and pdf2ps but no java
implementation of these. Help is desperately needed converting PDF to PS for
printing. hanks

0
1/26/2005 8:41:26 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

6 Replies
627 Views

Similar Articles

[PageSpeed] 21

"David McDivitt" <x12code-del@del-yahoo.com> wrote in message
news:vhvfv0p0ot5lnl236cefdvc61fdvno5cbj@4ax.com...
> We are creating PDF files in our application and storing them, but we must
> also print them. I have it narrowed down to executing LPR from the
> application. Sample postscript files printed OK with this command, so I
need
> to convert PDF files to postscript. I've been looking for something to do
> this and can't find it. I found such things as a2ps and pdf2ps but no java
> implementation of these. Help is desperately needed converting PDF to PS
for
> printing. hanks
>

Can you use Acrobat Reader?


0
Ann5715 (81)
1/26/2005 10:13:25 PM
No. These are server side java applications having batch print output. The
app server cannot be assumed to have printers attached. The LPR program will
send a postscript file to a print server. We just need to create the
postscript file. After more reading I see pdf2ps mentioned many times but
have not found a java library to implement it. Another option is the GS
linux/unix command but I haven't found the right documentation or syntax
yet. I would prefer to have java write a postscript file.

>Newsgroups: comp.lang.java.programmer
>From: "Ann" <Ann@nospam.invalid>
>Subject: Re: convert from PDF to postscript
>Date: Wed, 26 Jan 2005 16:13:25 -0600
>
>
>"David McDivitt" <x12code-del@del-yahoo.com> wrote in message
>news:vhvfv0p0ot5lnl236cefdvc61fdvno5cbj@4ax.com...
>> We are creating PDF files in our application and storing them, but we must
>> also print them. I have it narrowed down to executing LPR from the
>> application. Sample postscript files printed OK with this command, so I
>need
>> to convert PDF files to postscript. I've been looking for something to do
>> this and can't find it. I found such things as a2ps and pdf2ps but no java
>> implementation of these. Help is desperately needed converting PDF to PS
>for
>> printing. hanks
>>
>
>Can you use Acrobat Reader?
>

0
1/26/2005 10:45:59 PM
"David McDivitt" <x12code-del@del-yahoo.com> wrote in message
news:557gv0liu8bg5cm19nq01tskoobl339hhj@4ax.com...
> No. These are server side java applications having batch print output. The
> app server cannot be assumed to have printers attached. The LPR program
will
> send a postscript file to a print server. We just need to create the
> postscript file. After more reading I see pdf2ps mentioned many times but
> have not found a java library to implement it.

Why does it have to be a java library? Does the server support only java?

> Another option is the GS
> linux/unix command but I haven't found the right documentation or syntax
> yet. I would prefer to have java write a postscript file.
>
> >Newsgroups: comp.lang.java.programmer
> >From: "Ann" <Ann@nospam.invalid>
> >Subject: Re: convert from PDF to postscript
> >Date: Wed, 26 Jan 2005 16:13:25 -0600
> >
> >
> >"David McDivitt" <x12code-del@del-yahoo.com> wrote in message
> >news:vhvfv0p0ot5lnl236cefdvc61fdvno5cbj@4ax.com...
> >> We are creating PDF files in our application and storing them, but we
must
> >> also print them. I have it narrowed down to executing LPR from the
> >> application. Sample postscript files printed OK with this command, so I
> >need
> >> to convert PDF files to postscript. I've been looking for something to
do
> >> this and can't find it. I found such things as a2ps and pdf2ps but no
java
> >> implementation of these. Help is desperately needed converting PDF to
PS
> >for
> >> printing. hanks
> >>
> >
> >Can you use Acrobat Reader?
> >
>


0
Ann5715 (81)
1/26/2005 11:19:58 PM
It does not have to be a java library. When pdf2ps was first read about I
thought it was a java library, and I tried to find a pdf2ps java library.
Now it seems pdf2ps is a unix command and can be installed on the Solaris
box. If there I can use it from java applications. I do not have access to
the Solaris box. Another department manages that. When asked they said they
do not have pdf2ps. So I need to find where I can get it and documentation,
they ask them to install it. his seems to be the best approach to solve the
problem.


>Newsgroups: comp.lang.java.programmer
>From: "Ann" <Ann@nospam.invalid>
>Subject: Re: convert from PDF to postscript
>Date: Wed, 26 Jan 2005 17:19:58 -0600
>
>
>"David McDivitt" <x12code-del@del-yahoo.com> wrote in message
>news:557gv0liu8bg5cm19nq01tskoobl339hhj@4ax.com...
>> No. These are server side java applications having batch print output. The
>> app server cannot be assumed to have printers attached. The LPR program
>will
>> send a postscript file to a print server. We just need to create the
>> postscript file. After more reading I see pdf2ps mentioned many times but
>> have not found a java library to implement it.
>
>Why does it have to be a java library? Does the server support only java?
>
>> Another option is the GS
>> linux/unix command but I haven't found the right documentation or syntax
>> yet. I would prefer to have java write a postscript file.
>>
>> >Newsgroups: comp.lang.java.programmer
>> >From: "Ann" <Ann@nospam.invalid>
>> >Subject: Re: convert from PDF to postscript
>> >Date: Wed, 26 Jan 2005 16:13:25 -0600
>> >
>> >
>> >"David McDivitt" <x12code-del@del-yahoo.com> wrote in message
>> >news:vhvfv0p0ot5lnl236cefdvc61fdvno5cbj@4ax.com...
>> >> We are creating PDF files in our application and storing them, but we
>must
>> >> also print them. I have it narrowed down to executing LPR from the
>> >> application. Sample postscript files printed OK with this command, so I
>> >need
>> >> to convert PDF files to postscript. I've been looking for something to
>do
>> >> this and can't find it. I found such things as a2ps and pdf2ps but no
>java
>> >> implementation of these. Help is desperately needed converting PDF to
>PS
>> >for
>> >> printing. hanks
>> >>
>> >
>> >Can you use Acrobat Reader?

0
1/26/2005 11:30:57 PM
"David McDivitt" <x12code-del@del-yahoo.com> wrote in message 
news:pm9gv0p5aq8j582ekppfp4bbdjsf2ubtt9@4ax.com...
>>> >> We are creating PDF files in our application and storing them ...
>>> >> ... I have it narrowed down to executing LPR ...

> It does not have to be a java library. When pdf2ps was first read about I
> thought it was a java library, and I tried to find a pdf2ps java library.
> Now it seems pdf2ps is a unix command and can be installed on the Solaris
> box. If there I can use it from java applications. I do not have access to
> the Solaris box. Another department manages that. When asked they said 
> they
> do not have pdf2ps. So I need to find where I can get it and 
> documentation,
> they ask them to install it. his seems to be the best approach to solve 
> the
> problem.

Some suggestions:
    1) switch to a different output format from your application
        - you can for instance try JasperReports if you have
           the patience to learn a new system.

    2) write a servlet, .jsp or even (heaven forbid) .asp
        to capture the output, and save it or forward it to
        one of those non-java converters you found.
        (you seem to be on-track here)

    3) figure out how to call Acrobat Reader from your app
        and how to command it to print to a PostScript printer
        capture driver.

regards,
    Dar7yl


0
1/27/2005 3:15:00 AM
David McDivitt wrote:
> We are creating PDF files in our application and storing them, but we must
> also print them. I have it narrowed down to executing LPR from the
> application.

It is lpr, not LPR. Unix is case sensitive.

> Sample postscript files printed OK with this command, so I need
> to convert PDF files to postscript. I've been looking for something to do
> this and can't find it.

What? Whats wrong with Adobes own free Acrobat reader?

	acroread -toPostScript | lpr

Or what is wrong with the xpdf project's pdftops tool (under GPL)?

Or what is wrong with good old ghostscript?

I would be extremely surprised if non of these can be found on your 
server. It is more likely that you have two or even all of them.

/Thomas


-- 
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
0
nobody89 (1641)
1/27/2005 8:22:27 AM
Reply: