# PDF Display Issue

**URL:** <https://forum.inductiveautomation.com/t/pdf-display-issue/8802>\
**Category:** Ignition\
**Created:** [July 28, 2014, 7:31pm UTC](https://forum.inductiveautomation.com/t/pdf-display-issue/8802 "2014-07-28T19:31:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![denji26](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/denji26/32/5805_2.png) [@denji26](https://forum.inductiveautomation.com/u/denji26)\
**Post date:** [July 28, 2014, 7:31pm UTC](https://forum.inductiveautomation.com/t/pdf-display-issue/8802/1 "2014-07-28T19:31:29Z")

</div>

When trying to view a PDF in the PDF Viewer I saw this error:

JPeg2000 (/JPXDecode filter) not supported yet  
Unable to get xobject named “Im0”  
Exception in thread “AWT-EventQueue-2” com.ribs.pdf.PDFException: Error reading XObject  
at com.ribs.pdf.PDFPageParser.parse(PDFPageParser.java:687)  
at com.ribs.pdf.PDFPageParser.executeForm(PDFPageParser.java:1085)  
at com.ribs.pdf.PDFPageParser.parse(PDFPageParser.java:684)  
at com.ribs.pdf.PDFPageParser.parse(PDFPageParser.java:542)  
at com.ribs.pdf.PDFPageParser.parsePage(PDFPageParser.java:56)  
at com.ribs.pdf.PDFPage.parse(PDFPage.java:482)  
at com.ribs.pdf.PDFPage.getImage(PDFPage.java:473)  
at com.reportmill.graphics.RMPDFImageReader.getImage(RMPDFImageReader.java:74)  
at com.reportmill.graphics.RMImageData.awt(RMImageData.java:418)  
at com.reportmill.graphics.RMImageFill.awt(RMImageFill.java:602)  
at com.reportmill.graphics.RMImageFill.paintShape(RMImageFill.java:362)  
at com.reportmill.shape.RMShapePainter.paintShape(RMShapePainter.java:166)  
at com.reportmill.shape.RMShapePainter.paintShape\_super(RMShapePainter.java:145)  
at com.reportmill.shape.RMShapePainter.paintShapeDeep(RMShapePainter.java:90)  
at com.reportmill.shape.RMShapePainter.paintShapeDeep(RMShapePainter.java:98)  
at com.reportmill.RMViewer.paintComponent(RMViewer.java:554)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JViewport.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.paintChildren(AbstractVisionPanel.java:250)  
at javax.swing.JComponent.paint(Unknown Source)  
at com.inductiveautomation.factorypmi.plugins.reporting.components.ReportBase.paint(ReportBase.java:188)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.paintChildren(AbstractVisionPanel.java:250)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JLayeredPane.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at com.inductiveautomation.ignition.designer.designable.DesignPanel$DesignableContainerLayer.paintChildren(DesignPanel.java:1183)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintToOffscreen(Unknown Source)  
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)  
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)  
at javax.swing.RepaintManager.paint(Unknown Source)  
at javax.swing.JComponent.\_paintImmediately(Unknown Source)  
at javax.swing.JComponent.paintImmediately(Unknown Source)  
at javax.swing.RepaintManager$3.run(Unknown Source)  
at javax.swing.RepaintManager$3.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)  
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)  
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)  
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)  
at javax.swing.RepaintManager.access$1100(Unknown Source)  
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)  
at java.awt.event.InvocationEvent.dispatch(Unknown Source)  
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.awt.EventQueue.access$200(Unknown Source)  
at java.awt.EventQueue$3.run(Unknown Source)  
at java.awt.EventQueue$3.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.run(Unknown Source)

This happened in Ignition 7.7.0 and 7.5.12

I have attached the PDF that cuased the error.  
[PDF-Sample.pdf](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/72fed64def8fea95535b8a988401e6166bf5fa6c.pdf) (246 KB)

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [July 28, 2014, 8:54pm UTC](https://forum.inductiveautomation.com/t/pdf-display-issue/8802/2 "2014-07-28T20:54:41Z")

</div>

I would suggest using the PDF Viewer that is available from the Module Marketplace. It is free to use.

[marketplace.inductiveautomation. … oduleId=48](http://marketplace.inductiveautomation.com/moduledetail?5&moduleId=48)

I had issues trying to load your PDF as well, however it just wouldn’t load, I didn’t receive an error message. I would suggest using the module I suggested.

---

<div class="post-metadata">

**Author:** ![denji26](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/denji26/32/5805_2.png) [@denji26](https://forum.inductiveautomation.com/u/denji26)\
**Post date:** [July 28, 2014, 9:44pm UTC](https://forum.inductiveautomation.com/t/pdf-display-issue/8802/3 "2014-07-28T21:44:34Z")

</div>

I tried the module as per your suggestion and it does open the PDF properly.

For my use case, the client exports a ticket to be signed. When the signed ticket returns they scan in it and save as PDF, then attach it to the invoice and print/save it.

To attach the invoice I readFileAsBytes(), save it in the database, then display it as the second page in the Report Viewer in an Image Placeholder.

In this case I am unable to use the PDF Viewer module so I’m not sure how to handle this.
