[poppler] Spec question: Incremental updates and mixing XRef tables and streams

Fabio D'Urso fabiodurso at hotmail.it
Tue Apr 24 14:01:17 PDT 2012


On Tuesday, April 24, 2012 01:54:27 AM Leonard Rosenthol wrote:
> On 4/23/12 11:37 PM, "Fabio D'Urso" <fabiodurso at hotmail.it> wrote:
> >According to my tests, it seems to me that it's not possible to
> >incrementally-
> >update a document indexed by a XRef stream by appending a XRef table and
> >making /Prev point to the previous XRef stream (which is what poppler
> >currently does).
> 
> As they say in Ghostbusters - "Don't cross the streams"!
> 
> You are correct, you can't do that.  If the original file uses Xref
> streams, you need to append the same way.
> 
> Leonard
Many thanks :)

These are the patches and a semi-automated qt4 program to test them.

In patch 0002, I feel that writeStreamToBuffer should share code with 
writeTableToFile. But I can't think of a non-ugly way to do this (callbacks or 
arguments used alternatively both seem ugly to me).

The patches fix both bug38761 and bug49080. However bug49080's document has 
form problems when opened in acroread. Text field contents is only shown when 
user clicks on it. Maybe it's like bug44506 (I haven't spent much time on it).

Fabio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test programs.tar
Type: application/x-tar
Size: 10240 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120424/dfaaa2b3/attachment-0001.tar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactoring-of-XRef-table-write-support-in-preparati.patch
Type: text/x-patch
Size: 10667 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120424/dfaaa2b3/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Output-XRef-stream-when-incrementally-updating-if-th.patch
Type: text/x-patch
Size: 5782 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120424/dfaaa2b3/attachment-0003.bin>


More information about the poppler mailing list