poppler 20.12.0 regression with pdftops -level2sep
commit 75abc683 "PSOutputDev: use the DeviceN8 bitmap for rasterization with CMYK-output + overprint" breaks the attached file.
To test it, build poppler pdftops
cd /tmp/poppler ; rm -rf build ; mkdir build ; cd build ; cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF .. ; make -j4 pdftops
and then run the attached file through pdftops -level2sep
cd /tmp/poppler ; rm -f x.ps ; ./build/utils/pdftops -level2sep -f 1 -l 1 /u/tests/020_ReadMe_Ghent_Output_Patch.pdf x.ps ; gv x.ps
The background of the page should be white but the regression makes it purple.
I did a git bisection to identify the commit.
Setting overprint = false
in line 3182 of PSOutputDev::checkPageSlice() in PSOutputDev.cc makes the page come out correctly. I know that isn't a fix, but it confirms the location of the regression.
I have also attached valgrind results from 20.12.0. I checked that pdftops 20.11.0 is clean with valgrind. The first valgrind warning is an uninitialized variable in Splash::pipeRun() and the stack trace goes to PSOutputDev::checkPageSlice(). I suspect that when it sets internalColorFormat = splashModeDeviceN8, something is still using processColorFormat = splashModeCMYK8 and the last 4 channels aren't initialized. valgrind.txt
Is it really necessary to implement overprinting if -overprint is not requested?