Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Viewing a remote PDF file

Reply
Thread Tools

Viewing a remote PDF file

 
 
Hakan Lane
Guest
Posts: n/a
 
      03-13-2008

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
 
Reply With Quote
 
 
 
 
Knute Johnson
Guest
Posts: n/a
 
      03-13-2008
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
 
Reply With Quote
 
 
 
 
Jacob
Guest
Posts: n/a
 
      03-14-2008
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.

 
Reply With Quote
 
H.L
Guest
Posts: n/a
 
      03-14-2008
>
> 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.
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      03-15-2008
On Mar 15, 3:09*am, "H.L" <H...@operamail.com> 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
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      03-15-2008
Andrew Thompson wrote:
> On Mar 15, 3:09 am, "H.L" <H...@operamail.com> 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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-15-2008
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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-15-2008
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
 
Reply With Quote
 
Florian Huebner
Guest
Posts: n/a
 
      03-17-2008
> for tools to manipulate your pdf file without using Acrobat, see
> http://mindprod.com/jgloss/pdf.html
> and chase the links.


There is also the PDF-Renderer (https://pdf-renderer.dev.java.net/) if
you only want to view a pdf files in your Java application.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF file viewing Norvin Firefox 3 01-12-2009 02:14 PM
Postscript to PDF with pdf-tools, pdf-writer, or other Sean Nakasone Ruby 1 04-14-2008 09:13 PM
PDF::Writer, create pdf and insert in other pdf file. Ricardo Pog Ruby 1 03-26-2008 08:24 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
PC Viewing vs DVD Player Viewing - MP3 play very fast Ray Donzdorf Computer Support 0 12-11-2004 01:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57