convert from PDF to postscript

Discussion in 'Java' started by David McDivitt, Jan 26, 2005.

  1. 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
    David McDivitt, Jan 26, 2005
    #1
    1. Advertising

  2. David McDivitt

    Ann Guest

    "David McDivitt" <> wrote in message
    news:...
    > 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?
    Ann, Jan 26, 2005
    #2
    1. Advertising

  3. 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" <>
    >Subject: Re: convert from PDF to postscript
    >Date: Wed, 26 Jan 2005 16:13:25 -0600
    >
    >
    >"David McDivitt" <> wrote in message
    >news:...
    >> 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?
    >
    David McDivitt, Jan 26, 2005
    #3
  4. David McDivitt

    Ann Guest

    "David McDivitt" <> wrote in message
    news:...
    > 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" <>
    > >Subject: Re: convert from PDF to postscript
    > >Date: Wed, 26 Jan 2005 16:13:25 -0600
    > >
    > >
    > >"David McDivitt" <> wrote in message
    > >news:...
    > >> 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?
    > >

    >
    Ann, Jan 26, 2005
    #4
  5. 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" <>
    >Subject: Re: convert from PDF to postscript
    >Date: Wed, 26 Jan 2005 17:19:58 -0600
    >
    >
    >"David McDivitt" <> wrote in message
    >news:...
    >> 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" <>
    >> >Subject: Re: convert from PDF to postscript
    >> >Date: Wed, 26 Jan 2005 16:13:25 -0600
    >> >
    >> >
    >> >"David McDivitt" <> wrote in message
    >> >news:...
    >> >> 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?
    David McDivitt, Jan 26, 2005
    #5
  6. David McDivitt

    dar7yl Guest

    "David McDivitt" <> wrote in message
    news:p...
    >>> >> 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
    dar7yl, Jan 27, 2005
    #6
  7. 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
    Thomas Weidenfeller, Jan 27, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. fgdg
    Replies:
    236
    Views:
    3,638
    dorayme
    Feb 21, 2007
  2. Adam Tauno Williams

    PDF To Postscript

    Adam Tauno Williams, Mar 17, 2011, in forum: Python
    Replies:
    0
    Views:
    254
    Adam Tauno Williams
    Mar 17, 2011
  3. Ray(:bies, :mundo)
    Replies:
    2
    Views:
    109
    Ray(:bies, :mundo)
    Aug 18, 2006
  4. Sean Nakasone
    Replies:
    1
    Views:
    337
    Farrel Lifson
    Apr 14, 2008
  5. Daniel Berger
    Replies:
    0
    Views:
    168
    Daniel Berger
    Feb 6, 2009
Loading...

Share This Page