Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 6.0
-
Fix Version/s: 6.0
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:ICEpdf 5.0.0 open source release
Description
When a PDF file is decoded using linear traversal, the offsets in the file are calculated during parsing rather than using offsets from the xref tables. There seem to be errors in the offset calculation causing parsing errors later on.
The snippet below mimics a scenario where a file was decoded, soft references were cleared and the LazyObjectLoader subsequently attempts to reload an object. This results in an EmptyStackException due to the file offset being incorrect.
{code}Document d = new Document();
d.setFile( "USGS NJ_Jersey_City_20110609_TM_geo.pdf" );
Page page = d.getPageTree().getPage( 0 );
page.init();
Library library = page.getLibrary();
Reference reference = new Reference( 496, 0 );
library.getObject( reference );
Field lolField = library.getClass().getDeclaredField( "lazyObjectLoader" );
lolField.setAccessible( true );
LazyObjectLoader lol = ( LazyObjectLoader ) lolField.get( library );
lol.loadObject( reference );{code}
The snippet below mimics a scenario where a file was decoded, soft references were cleared and the LazyObjectLoader subsequently attempts to reload an object. This results in an EmptyStackException due to the file offset being incorrect.
{code}Document d = new Document();
d.setFile( "USGS NJ_Jersey_City_20110609_TM_geo.pdf" );
Page page = d.getPageTree().getPage( 0 );
page.init();
Library library = page.getLibrary();
Reference reference = new Reference( 496, 0 );
library.getObject( reference );
Field lolField = library.getClass().getDeclaredField( "lazyObjectLoader" );
lolField.setAccessible( true );
LazyObjectLoader lol = ( LazyObjectLoader ) lolField.get( library );
lol.loadObject( reference );{code}
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #34515 | Wed Apr 24 07:30:34 MDT 2013 | patrick.corless | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/core/src/org/icepdf/core/util/Parser.java
|