i want to display a PDF file in a JFrame .. how do i code it, can some one send me the code for this..

i googled, it but couldn't find any .. plzz help me

Recommended Answers

All 6 Replies

try iText library here are some examples

try iText library here are some examples

no it didnt work.... i just want to display a text document in a JFRAME .... its okk, if its PDF or wat ever the type is,,, just a document....


plzz help.. i am really lost now

no it didnt work.... i just want to display a text document in a JFRAME .... its okk, if its PDF or wat ever the type is,,, just a document....

You have lost us now, Do you mean to say that anytype of document (PDF, Word, Word2007, ODF, .... ) should be viewable in your JFrame or just a good old normal Plain Text File (the one we create with Notepad).

You have lost us now, Do you mean to say that anytype of document (PDF, Word, Word2007, ODF, .... ) should be viewable in your JFrame or just a good old normal Plain Text File (the one we create with Notepad).

what i wont is to Display a PDF document in a JFRame .... but if there is no way to do that, i would also prefer, if i could display a word file or a Powerpoint slides, on the JFRame ..

1st preference goes to the PDF, and if it doesn't work, any of the above mentioned files (word , powerpont), would do,...

If you actually try to use google little you would find plenty of resources, simple search as Java display pdf in JFrame. From the first page half of these use iText.

Have nice day

You can use the Java Bean interface provided by Adobe for viewing PDF files in a JFrame.
From here you can download the Java Bean interface for an Acrobat viewer and here is the tutorial on how to use it.

Both of them found on the First Page of Google Search for "display PDF in JFrame"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.