Forums Register Login

open acrobat reader in swing component

+Pie Number of slices to send: Send
I am developing one swing application
Is there any way where we can open Acrobat Reader inside a swing component like panel?

+Pie Number of slices to send: Send
No. But the https://pdf-renderer.dev.java.net/ project is a Swing component that can display PDFs in pure Java.
+Pie Number of slices to send: Send
Can you use Runtime.exec() for that?

But it looks a technique fraught with possible errors, so you should not try Runtime.exec() unless you have read Michael Daconta's classic article which this search should find: when Runtime.exec() won't.
+Pie Number of slices to send: Send
In JDK6 you can use the Desktop class to open the file in the default application for the given file type.
+Pie Number of slices to send: Send
Using Runtime object we can launch external programs but we cannot make acrobat reader to appear in swing component ......

I am not sure about desktop classs .Can any one try and give me some sample code so that i can use it.
+Pie Number of slices to send: Send
 

I am not sure about desktop classs



What error messages did you get when you tried it?

Read the API, search the web and you will find examples.
+Pie Number of slices to send: Send
Desktop.open will also not open the PDF document in Swing but will also just call the system default application (Acrobat Reader) as a separate process.
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1879 times.
Similar Threads
Problems accessing SCWCD notes from the links page
convertion of pdf
Can swing use to preview pdf file..?
Pdf, doc and excel from Swing
Open a file on the desktop
Error opening pdf file from modal window
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:58:12.