You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/10/10 21:18:34 UTC

[jira] [Updated] (PDFBOX-1863) Can't resize PDFPagePanel render

     [ https://issues.apache.org/jira/browse/PDFBOX-1863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hewson updated PDFBOX-1863:
--------------------------------
    Affects Version/s: 2.0.0
                       1.8.7

> Can't resize PDFPagePanel render
> --------------------------------
>
>                 Key: PDFBOX-1863
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1863
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Swing GUI
>    Affects Versions: 1.8.7, 2.0.0
>            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.3.4#6332)