Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.3.3
-
Fix Version/s: 4.3.4
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:any
Description
This issue is a continuation of PDF-434. The file in question has two images, each of which has a width that is a PDF reference which is not define in the file. I updated the code in PDF-434 to use the height value if the width could not be resolved. This allows for the image to show up but the image is skewed as the height value isn't the correct value.
Because this issue is such a corner case I could probably deduce the width from the page size ratio and it should be very low risk to other images.
Because this issue is such a corner case I could probably deduce the width from the page size ratio and it should be very low risk to other images.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
I've revisited this issue and have tried to come up with fix that will detect the page size and try derive the missing image dimension. This method will always assume a legal page size but can be over ridden using the property org.icepdf.core.pageRatio. I don't particularly like this fix but the Stream object has no visibility to the parent Page object. The only other consolation is that this is a one off malformed PDF that is missing a required property. Because of the compression type there is now accurate way to figure out the missing dimension using the bits per colour and stream length.