Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

Viewing a remote PDF file

Thread view: 
Hakan Lane - 13 Mar 2008 18:49 GMT
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.

Signature

Newsoffice.de - Die Onlinesoftware zum Lesen und Schreiben im Usenet
Die Signatur läßt sich nach Belieben anpassen ;-)

Knute Johnson - 13 Mar 2008 19:59 GMT
> 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
[quoted text clipped - 5 lines]
>
> Regards.

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

Signature

Knute Johnson
email s/nospam/linux/

Jacob - 14 Mar 2008 08:57 GMT
> 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
[quoted text clipped - 3 lines]
> 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.
H.L - 14 Mar 2008 17:09 GMT
> Just identify your file as either a java.io.File or a java.net.URI
> instance and you can display it directly using:
[quoted text clipped - 3 lines]
> 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.
Andrew Thompson - 15 Mar 2008 01:42 GMT
...
>  ...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
Lew - 15 Mar 2008 05:00 GMT
> ...
>>  ...The problem is that I am working with Netbeans
[quoted text clipped - 7 lines]
> 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.

Signature

Lew

Roedy Green - 15 Mar 2008 05:02 GMT
> 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
Signature


Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Roedy Green - 15 Mar 2008 05:03 GMT
> 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.
Signature


Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Florian Huebner - 17 Mar 2008 16:42 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.