I have a PDF where 'pdftops -level1sep -optimizecolorspace' gets 'Syntax Error: 
Could not find start of jpeg data' and drops part of the image.
The problem happens in PSOutputDev::doImageL1Sep() where it prescans the image 
by making a new ImageStream(str, width, colorMap->getNumPixelComps(), 
colorMap->getBits()).
When I made the patch to add -optimizecolorspace, I had first tried scanning 
the original stream and then using imgStr->reset(), but it didn't work for some 
types of streams, so I switched creating a new stream, which is the code 
currently in poppler.
But even that doesn't seem to work for DCTStream.

Is the problem that some types of streams can never be reread (which means that 
-optimizecolorspace can't work as written) or that rereading streams isn't well 
tested and I might be able to fix it by reviewing the initialization?

I can post a bug report, including the PDF, which is only 350KB, if it would 
help.

Thanks, William
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to