Álison Fernandes created PDFBOX-1863:
----------------------------------------

             Summary: 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)

Reply via email to