[Poppler-bugs] Cannot open in poppler 0.22.1 a file saved after large file support patches

Adrian Johnson ajohnson at redneon.com
Fri Feb 15 16:27:36 PST 2013


On 16/02/13 09:53, Fabio D'Urso wrote:
> Hi,
> 
> I'm not able to open files saved by git-master poppler in poppler 0.22:
> Syntax Error: Couldn't find trailer dictionary
> Syntax Error: Couldn't read xref table
> 
> I noticed that large file support patches changed how we write incremental 
> updates of XRef streams. In particular I'm referring to 
> XRef::XRefStreamWriter::writeEntry and XRef::writeStreamToBuffer.
> 
> Previously we used to write 4-bytes offsets in XRef streams, now we always 
> write 8-bytes offsets (sizeof(Goffset)).
> If I understand correctly older poppler versions are not able to read those 
> files because they don't have large file support.
> 
> In other words, even if the files we create are good, all previous poppler 
> versions (including 0.22.1) are not able to open them back.

Could you open a bug to track this issue.

> 
> Maybe we had better keep emitting 4-bytes entries for compatibility when 
> possible (i.e. if no offset exceeds the 4GB limit), what do you think?

Yes it would be best to check if all offsets in the xref stream are less
than 4GB and if so, write 4 byte offsets.

> 
> I'm currently working on some patches about rotation issues with annotations. 
> I can put this issue on my queue if you're too busy.

I won't have time to work on this for a week or two so feel free to have
a look at it.

> 
> Example file (if you're using Okular, just add some annotation to it and save 
> to get an "unopenable" file):
>  http://www.dmi.unict.it/~fstanco/lezioni_IEM_2007_2008/quarta_parte_colori.pdf
> 
> Thank you,
> Fabio
> 



More information about the Poppler-bugs mailing list