I would hope this code works for somebody: if Desktop. Ipereto Ipereto 41 4 4 bronze badges. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Visit chat. Linked Related Hot Network Questions. Active 11 months ago. Viewed 26k times. I have an existing interface that has a JPanel for displaying pdf files. Improve this question.
Do you mean by using nothing but core Java? If so, then as far as I know, you can't. Can you share any code e. Having that it would be easier to help you. From this brief introduction I could only suggest an approach similar to HTML frames where you can display more than one html document in one window. Yes I would like to not use libraries as far as possible, because some open the pdf in a new window, and others create their own JPanel. I have a set size for the panel and a set location.
Also if it is not possible, what library can I use to display the pdf in MY panel that is already created? Add a comment. Active Oldest Votes. Improve this answer.
Wajdy Essam Wajdy Essam 4, 1 1 gold badge 27 27 silver badges 33 33 bronze badges. Thanks, i'll give it a try. Does this also work in linux and other operating systems? WajdyEssam I am getting the following error: Exception in thread "main" java. Otherwise, useful answer. Show 2 more comments. I think the best alternative is to use ICEpdf. Recent Projects Contact Us.
The iText classes are very useful for people who need to generate read-only, platform independent documents containing text, lists, tables and images. Go To iText gnujpdf gnujpdf is a Java package gnu. It provides a simple API to create pdf files and print using subclasses of java. Graphics and java. The PDF classes write to an OutputStream in pdf format instead of a typical Graphics object, but the method calls are the same as they would be in any Applet or Application drawing to a canvas.
This project will allow access to all of the components in a PDF document.
0コメント