You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/04/29 18:20:06 UTC
[jira] [Commented] (PDFBOX-2501) Page render without barcode
[ https://issues.apache.org/jira/browse/PDFBOX-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519649#comment-14519649 ]
Tilman Hausherr commented on PDFBOX-2501:
-----------------------------------------
I will do the fix for 1.8 too, after receiving a file in the user mailing list with the same problem. That file was created by "Pantheon PDF export". The only thing I could find on google was a bug in GS for the exact same reason:
http://bugs.ghostscript.com/show_bug.cgi?format=multiple&id=690734
> Page render without barcode
> ---------------------------
>
> Key: PDFBOX-2501
> URL: https://issues.apache.org/jira/browse/PDFBOX-2501
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.8.7
> Environment: Ubuntu Linux, Java 8
> Reporter: Daniel Egea
> Assignee: Tilman Hausherr
> Fix For: 2.0.0
>
> Attachments: image.png, iris2_4943659641078733308.pdf, iris2_4943659641078733308_unc.pdf
>
>
> I have tryed this code:
> {code}
> try {
> PDDocument doc = PDDocument.load(f);
> PDPage page = (PDPage) doc.getDocumentCatalog().getAllPages().get(0);
> BufferedImage image;
> image = page.convertToImage();
> File outputfile = new File("/home/daniel/image.png");
> ImageIO.write(image, "png", outputfile);
> } catch (IOException ex) {
> Logger.getLogger(Impresora.class.getName()).log(Level.SEVERE, null, ex);
> }
> {code}
> Using the PDF attached
> And get the PNG attached
> In the rendering process I get the following error... in the 'convertToImage()' call
> {code}
> 2014-11-14 13:56:12,592 WARN [org.apache.pdfbox.util.PDFStreamEngine] - <java.lang.ArrayIndexOutOfBoundsException>
> java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at org.apache.pdfbox.pdmodel.graphics.xobject.PDInlinedImage.createImage(PDInlinedImage.java:218)
> at org.apache.pdfbox.util.operator.pagedrawer.BeginInlineImage.process(BeginInlineImage.java:69)
> at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:557)
> at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:268)
> at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:235)
> at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:215)
> at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:139)
> at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:801)
> at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:732)
> {code}
> One for each of the 4 barcodes in PDF file
> As you can see, te page is rendered OK but without any barcode
> How could I render completily OK?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org