[ https://issues.apache.org/jira/browse/PDFBOX-1863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13881191#comment-13881191 ]
John Hewson commented on PDFBOX-1863: ------------------------------------- It seems that PDFPagePanel was not created with serious use in mind. Feel free to checkout the source from svn and make whatever changes are needed and attach an _svn diff_ to this issue. > Can't resize PDFPagePanel render > -------------------------------- > > Key: PDFBOX-1863 > URL: https://issues.apache.org/jira/browse/PDFBOX-1863 > Project: PDFBox > Issue Type: Bug > Reporter: Álison Fernandes > > I tried to use PDFPagePanel to render a PDF to an applet but, I had to change > my implementation because PDFPagePanel wasn't resizing the rendering so it > could be bigger. > I've checked in the source code (of pdfbox-1.8.2 and in the SVN trunk), the > Dimension drawDimension var that sets the rendering size isn't accessible > from outside and it will draw using the dimension of the PDF Cropbox. > My current implementation to bypass this is: > - Create a JPanel > - Render the page to an image using PDPage.convertToImage(...) > - Add the image to the JPanel using JLabel picLabel = new JLabel(new > ImageIcon(page.convertToImage(...))); > - Repeat for all the pages > - Set the panel as a viewport in a JScrollPane > Unfortunately, this method takes way too much time if you have to render > things multiple times (~1 second for more complex pages with forms). -- This message was sent by Atlassian JIRA (v6.1.5#6160)