Details
Description
FINE: Error initiating page: 2
java.lang.NullPointerException
at org.icepdf.core.pobjects.Page.initPageContents(Page.java:246)
at org.icepdf.core.pobjects.Page.init(Page.java:338)
at org.icepdf.core.views.swing.PageViewComponentImpl$PageInitilizer.run(PageViewComponentImpl.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
java.lang.NullPointerException
at org.icepdf.core.pobjects.Page.initPageContents(Page.java:246)
at org.icepdf.core.pobjects.Page.init(Page.java:338)
at org.icepdf.core.views.swing.PageViewComponentImpl$PageInitilizer.run(PageViewComponentImpl.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
The PDF in question is malformed. The Third page of the document has a content stream which can not be resolved. As seen below the 16 0 obj does not contain any stream data nor is it correctly terminated. I can update the page class so that it doesn't though an exception but otherwise we are showing all that we can for this particular document.
16 0 obj
<<
13 0 obj
<<
/Type /Page
/Parent 1 0 R
/Resources <<
/XObject <<
/WM0 7 0 R
>>
/ProcSet [/PDF /Text]
>>
/Annots [14 0 R 15 0 R]
/MediaBox [0 0 595.2 841.919]
/Contents [16 0 R]
>>
endobj