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

Fabio D'Urso fabiodurso at hotmail.it
Fri Feb 15 15:23:38 PST 2013


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.

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?

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.

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