Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 4.3.3
-
Fix Version/s: 5.0.1
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:ICEpdf 4.3.3 PRO
-
Salesforce Case Reference:
Description
Attached image produces an NPE exception similar to the following:
Exception in thread "main" java.lang.NullPointerException
at org.icepdf.core.pobjects.Document.getPageImage(Document.java:1063)
I did some debugging and found that statements:
Document document = new Document();
document.setFile(filePath);
create a new document object, but getNumberOfPages() method of this object always return zero. Furthermore an exception is thrown when the following line executed thereafter:
int number = document.getNumberOfPages();
BufferedImage image = (BufferedImage) document.getPageImage( number, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); <<< NPE thrown at this line
Exception in thread "main" java.lang.NullPointerException
at org.icepdf.core.pobjects.Document.getPageImage(Document.java:1063)
I did some debugging and found that statements:
Document document = new Document();
document.setFile(filePath);
create a new document object, but getNumberOfPages() method of this object always return zero. Furthermore an exception is thrown when the following line executed thereafter:
int number = document.getNumberOfPages();
BufferedImage image = (BufferedImage) document.getPageImage( number, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); <<< NPE thrown at this line
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Field | Original Value | New Value |
---|---|---|
Attachment | agency.pdf [ 14786 ] |
Salesforce Case | [] | |
Fix Version/s | 4.3.4 [ 10341 ] |
Fix Version/s | 4.5 [ 10342 ] | |
Fix Version/s | 4.3.4 [ 10341 ] |
Fix Version/s | 5.0 [ 10314 ] | |
Fix Version/s | 4.5 [ 10342 ] |
Fix Version/s | 5.0.1 [ 10872 ] | |
Fix Version/s | 5.0 [ 10314 ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Salesforce Case Reference | 5007000000NIM5zAAH |
Status | Resolved [ 5 ] | Closed [ 6 ] |