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- [email protected]: > Message: 4 > Date: Thu, 20 Oct 2011 17:08:33 +0200 > From: Albert Astals Cid <[email protected]> > Subject: Re: [poppler] write smaller files > To: [email protected] > Message-ID: <1798296.ZfMvDxTfXU@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 _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
