With "pdftops -level1sep", the gray logo at the upper right is missing, or more precisely, it appears but is then overwritten by white. I used pdftops from popper-0.15.2, but it also happens with pdftops from xpdf-3.02pl4, so it is an old problem. I am using 32-bit version of Fedora 14 Linux. This is a different issue than the image issue that I reported a few weeks ago. A version of pdftops with my HasColorPattern patch does not show the HasColorPattern comment on this file.
The PDF is 2.5 MB so bugzilla would not accept it. I have temporarily posted it to http://williambader.com/elp-S37263-14dec10.pdf
Created attachment 41131 [details] [review] patch to fix this PDF This patch adds code to PSOutputDev::doImageL1Sep() to call maskToClippingPath() when it is passed an explicit mask. With this patch, pdftops -level1sep generates the correct image for the attached PDF.
Created attachment 41134 [details] [review] revised patch that fixes this PDF for both -level1 and -level1sep This patch is similar to the first one, but includes similar changes to doImageL1().
Created attachment 41146 [details] [review] revised patch for that runs faster This patch should produce the same results as the previous patch, but when generating level1sep output from the attached pdf, this patch reduces the pdftops runtime from 12.7 sec to 1.9 sec (on a 2.2GHz Core2Duo running Fedora 14). The patch has two main differences from the previous one. When writing the image data in doImageL1Sep(), if processColors already has every process color set, it uses an alternate loop that does not call addProcessColor() on each pixel. Also, when writing the image data, instead of calling writePSFmt("{0:02x}") for each pixel, it saves a line at a time in a buffer and writes the buffer with a new writePSBuf() function that takes a string and a length. The patch has less effect on other output options and on other files.
Created attachment 41153 [details] [review] revised patch that runs faster for -level1sep This patch is similar to the previous patch except that it also skips the process color check in checkPageSlice() if all of the color flags have already been set. This makes -level1sep output faster for some files.
I've finished running the regtest with -level1sep and it all looks nice and improves a few pdf files I´ll be running also regtest with other the levels but that should not present any problem since i understand it should not affect at all if it is not level1sep
Unfortunately your patch breaks conversion to ps of the first page of a pdf i will be attaching when running with -level1 Please have a look and fix.
Created attachment 41896 [details] pdf that breaks with -level1
Created attachment 41898 [details] [review] Revised patch that fixes the problem with -level1 This should fix the problem. One place that converted bytes to hex was wrong.
Regtest has finished correctly, i'll give the patch a final review and commit it in a few hours :-)
It's in, thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.