![]() |
|
#1
|
|||
|
|||
view PDF files using javaHi all,
does someone know how to view PDF file using java? i would like to view the pdf files while i run the java program! hope someone can show me the coding example! Thanks! |
|
#2
|
||||
|
||||
Re: view PDF files using javaHi bryan,
Do you want to open the files in Adobe reader or your java application? If you want to read the file in a java application itself, it is difficult. Else, You can use the Runtime.exec function. Like this: JAVA Code:
So, by specifying a *.pdf file, Windows will try to start the appropriate program (Adobe Reader or whatever application is registered for PDF files). You can find more information about Runtime.exec, visit this link: Runtime java reference http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html How to use Runtime.exec() If you want it to open in your java application itself, visit this link: Java Libraries to read and write pdf files Regards, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#3
|
|||
|
|||
Re: view PDF files using javaHi paramesh,
thanks to help me but i m to weak in java so i cant get to solve the problem with the function u gv me! can u gv me a simple full program example here that hw to call the pdf file out using java program which when i run the java program then the pdf file will open using acrobat reader. my pdf file name is chart.pdf and the directory is ( C:\chart.pdf ). soli cos disturb u n gv u trouble. Rgds, bryan |
|
#4
|
||||
|
||||
Re: view PDF files using javaHi Bryan,
Here is a sample program: JAVA Code:
I hope you know what try and catch statements are! If you have read those links, then you'll understand why this is a bad method. But it is simple. Thats why i posted it. Quote:
Cheers, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#5
|
|||
|
|||
Re: view PDF files using javaThanks you very much paramesh! i manage to open it already! Thanks to help a java newbie!
Rgds, bryan |
Recent GIDBlog
Observations of Iraq by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| update view from a for loop | Rabbit_May | MS Visual C++ / MFC Forum | 0 | 25-Mar-2005 09:43 |
| Checking source codes of image, audio and video files | onauc | C Programming Language | 5 | 26-Feb-2005 21:47 |
| Browser's Language Interpreters | onauc | Open Discussion Forum | 0 | 18-Nov-2004 18:53 |
| Apache2 config issues | monev | Apache Web Server Forum | 2 | 28-Jun-2004 06:19 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The