[poppler] poppler Digest, Vol 80, Issue 26

Axel Strübing axel.struebing at freenet.de
Fri Oct 21 03:32:27 PDT 2011


Hi Albert,

no problem. I will wait for the xpdf-merge and then prepare an adapted 
version.  I will think of a generalization in the meantime, as the patch works 
only for PDF-files, that consists of reference streams only.
Good luck.

Am Donnerstag, 20. Oktober 2011, 12:00:29 schrieb poppler-
request at lists.freedesktop.org:
> Message: 4
> Date: Thu, 20 Oct 2011 17:08:33 +0200
> From: Albert Astals Cid <aacid at kde.org>
> Subject: Re: [poppler] write smaller files
> To: poppler at lists.freedesktop.org
> Message-ID: <1798296.ZfMvDxTfXU at bluebox>
> Content-Type: text/plain; charset="utf-8"
> 
> A Dimecres, 19 d'octubre de 2011, Axel Str?bing v?reu escriure:
> > Dear popplers,
> >
> > 
> >
> > maybe it is of no great relevance, but I prepared a patch (attached) to
> > save space in files written by 'saveCompleteRewrite' in case the input
> > uses 'Cross-Reference Streams'
> > and  'Object Streams'.
> >
> > 
> >
> > In the current state every object from the input is read into the
> > xref-table and independently saved into the output file. This applies
> > to object streams, too. When each object is saved conventionally, and a
> > standard xref section is written to the new file (), there is no need
> > to write the object streams and reference streams to it.
> >
> > 
> >
> > This applies to the linearization dictionary, which is invalidated by a
> > rewrite, too.
> >
> > 
> >
> > The attached patch introduces two helpers in
> > Linearization.cc/Linearization.h and XRef.h  to get object number of
> > linearization dict and xrefstream flag, respectively. Than changes
> > 'saveCompleteRewrite' to not write content of object streams, reference
> > streams and linearization dictionary into the output, but mark the
> > coresponding objects as free.
> >
> > 
> >
> > The patched poppler works fine for my limited test cases.
> >
> > 
> >
> > I want to ask if someone more knowledgeable than me
> > could check for possible implications.
> >
> > 
> >
> > Feel free to change anything. Any thoughts are welcome.
> 
> We are trying no to touch anything of the poppler/ directory because at the 
> moment we are working on merging xpdf-3.03 changes into poppler/ and the
> more things we change now the more difficult it will be finishing the
> merge.
> 
> What do you think of holding back the patch until we merge xpdf 3.03? Most 
> probably i will forget about this patch so it would be cool if you could
> keep  an eye on the list and once we announce the xpdf 3.03 merging is done
> you remind us of it
> 
> Albert
> 
> > 
> >
> > regards
> > Axel
--
regards
Axel


More information about the poppler mailing list