Viewing a remote PDF file

Discussion in 'Java' started by Hakan Lane, Mar 13, 2008.

  1. Hakan Lane

    Hakan Lane Guest

    The application should fetch a PDF file from a web server and display
    it to the user. The file will have been generated elsewhere, so I just
    need to be able to view it and send it to a local printer. Do I need to
    download an external package to do that? If so, it would be nice to know
    which one is reasonably straightforward to integrate. Please note the
    separate functions of acessing a remote file and displaying it in the
    application. Thanks in advance.

    Regards.

    --
    Newsoffice.de - Die Onlinesoftware zum Lesen und Schreiben im Usenet
    Die Signatur läßt sich nach Belieben anpassen ;-)
     
    Hakan Lane, Mar 13, 2008
    #1
    1. Advertising

  2. Hakan Lane wrote:
    >
    > The application should fetch a PDF file from a web server and display it
    > to the user. The file will have been generated elsewhere, so I just need
    > to be able to view it and send it to a local printer. Do I need to
    > download an external package to do that? If so, it would be nice to know
    > which one is reasonably straightforward to integrate. Please note the
    > separate functions of acessing a remote file and displaying it in the
    > application. Thanks in advance.
    >
    > Regards.
    >


    Web browsers do that? You need to have Acrobat installed.

    --

    Knute Johnson
    email s/nospam/linux/

    --
    Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
    ------->>>>>>http://www.NewsDemon.com<<<<<<------
    Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
     
    Knute Johnson, Mar 13, 2008
    #2
    1. Advertising

  3. Hakan Lane

    Jacob Guest

    Hakan Lane wrote:

    > The application should fetch a PDF file from a web server and display it
    > to the user. The file will have been generated elsewhere, so I just need
    > to be able to view it and send it to a local printer. Do I need to
    > download an external package to do that? If so, it would be nice to know
    > which one is reasonably straightforward to integrate. Please note the
    > separate functions of acessing a remote file and displaying it in the
    > application. Thanks in advance.


    Just identify your file as either a java.io.File or a java.net.URI
    instance and you can display it directly using:

    Desktop.getDesktop().browse(uri); // or file.toURI()

    I am not sure if you can print it programatically from your java app,
    the user probably needs to push the browser print button.
     
    Jacob, Mar 14, 2008
    #3
  4. Hakan Lane

    H.L Guest

    >
    > Just identify your file as either a java.io.File or a java.net.URI
    > instance and you can display it directly using:
    >
    > Desktop.getDesktop().browse(uri); // or file.toURI()
    >
    > I am not sure if you can print it programatically from your java app,
    > the user probably needs to push the browser print button.


    Thank you for the tip. The problem is that I am working with Netbeans
    5.5.1, which dopes not support Java 1.6 . Would you know how to do it in
    Java 1.5 environments?

    Regards.
     
    H.L, Mar 14, 2008
    #4
  5. On Mar 15, 3:09 am, "H.L" <> wrote:
    ...
    >  ...The problem is that I am working with Netbeans
    > 5.5.1, which dopes not support Java 1.6 .


    No. The 'problem' is that apparently you do not know
    how to use the IDE. NetBeans supports Ant, and Ant
    can compile for a later version of Java than is used
    in the IDE.

    But more important than what your IDE supports, what
    minimum level of Java runtime is this code aimed at?

    --
    Andrew T.
    PhySci.org
     
    Andrew Thompson, Mar 15, 2008
    #5
  6. Hakan Lane

    Lew Guest

    Andrew Thompson wrote:
    > On Mar 15, 3:09 am, "H.L" <> wrote:
    > ...
    >> ...The problem is that I am working with Netbeans
    >> 5.5.1, which dopes not support Java 1.6 .

    >
    > No. The 'problem' is that apparently you do not know
    > how to use the IDE. NetBeans supports Ant, and Ant
    > can compile for a later version of Java than is used
    > in the IDE.
    >
    > But more important than what your IDE supports, what
    > minimum level of Java runtime is this code aimed at?


    Besides, NetBeans 6.x is just a free download away.

    --
    Lew
     
    Lew, Mar 15, 2008
    #6
  7. Hakan Lane

    Roedy Green Guest

    On Thu, 13 Mar 2008 18:49:39 +0100, Hakan Lane <> wrote,
    quoted or indirectly quoted someone who said :

    > The application should fetch a PDF file from a web server and display
    >it to the user. The file will have been generated elsewhere, so I just
    >need to be able to view it and send it to a local printer. Do I need to
    >download an external package to do that?


    The easy way would be just to download the file. see
    http://mindprod.com/products.html#FILETRANSFER

    Then exec adobe acrobat on it.
    See http://mindprod.com/jgloss/exec.html
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Mar 15, 2008
    #7
  8. Hakan Lane

    Roedy Green Guest

    On Thu, 13 Mar 2008 18:49:39 +0100, Hakan Lane <> wrote,
    quoted or indirectly quoted someone who said :

    > The application should fetch a PDF file from a web server and display
    >it to the user. The file will have been generated elsewhere, so I just
    >need to be able to view it and send it to a local printer. Do I need to
    >download an external package to do that? If so, it would be nice to know
    >which one is reasonably straightforward to integrate. Please note the
    >separate functions of acessing a re


    for tools to manipulate your pdf file without using Acrobat, see
    http://mindprod.com/jgloss/pdf.html
    and chase the links.
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Mar 15, 2008
    #8
  9. Florian Huebner, Mar 17, 2008
    #9
    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. =?Utf-8?B?UGF0TGFm?=

    Problem with pdf viewing in IE

    =?Utf-8?B?UGF0TGFm?=, Feb 27, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    489
    Patrick Laferriere
    Mar 4, 2004
  2. Eric Lawrence [MSFT]

    Re: Still problems viewing pdf in IE...posting code

    Eric Lawrence [MSFT], Mar 1, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    621
    john farrow
    Mar 2, 2004
  3. Mike Collier
    Replies:
    2
    Views:
    119
    Mike Collier
    Jan 20, 2004
  4. Ricardo Pog
    Replies:
    1
    Views:
    435
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    383
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page