El dijous, 10 de setembre de 2020, a les 23:00:57 CEST, William Bader va escriure: > 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?
Everyting should be able to reset + re.read, i mean it's just data on disk/memory so i don't see why it wouldn't work (without bugs). Cheers, Albert > > 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
