[poppler] Black boxes & Poppler

Albert Astals Cid aacid at kde.org
Tue Feb 14 14:17:49 PST 2012


El Dimarts, 14 de febrer de 2012, a les 20:35:29, Thomas Freitag va escriure:
> Hi Albert!
> 
> Am 14.02.2012 18:07, schrieb Ralph Gootee:
> > Hi Thomas!
> > 
> > Thanks for the help!
> > 
> > Steps to reproduce
> > 
> > 1) split the pdf with pdfseparate
> > 2) use pdftopdf to convert the output to png
> > 
> > Also, the PDF errors out acrobat after separation.  It's a little
> > confusing but there's already black boxes in the pdf (from redaction)
> > the black boxes will show up in the middle after pdftoppm.
> > 
> > We're really really happy with poppler, thanks for helping to make such
> > an awesome lib!
> We have two problems with it, one is a general problem coming from the
> merge:
> 
> a) xRef->getNumObjects() will no more work with the changes from our/my
> merge in PDFDoc::writePageObjects, 'cause last is not set here. We need
> to use xRef->getSize().

We use getNumObjects in a lot of other places, aren't those affected too? 
Shouldn't we just revert getNumObjects to do what it did? i.e. kill the last 
variable and just return size? What's the benefit of this last variable?

Albert

> b) CCITTFaxStream and DCTStream are enherited by FlateStream, and the
> FlateStream::reset "eats" the first two bytes. Therefore a call of
> unfilteredReset will not work in pdfseparate. As far as I can see,
> unfilteredReset is just called by PDFDoc::writeRawStream (or in
> Stream.cc itself), therefore I think my changes in the attached patch
> are safe.
> 
> a) is the reason why I send this patch immediately and do not wait until
> the weekend: pdfseparate and pdfunite will no more work on the HEAD
> revision.
> 
> @Ralph: You need to check out the head revision and apply this patch, if
> You want to test it immediately.
> 
> Cheers,
> Thomas
> 
> > Cheers,
> > Ralph G.


More information about the poppler mailing list