Summary: | patch to fix ps generation from pdftops with -level1sep | ||
---|---|---|---|
Product: | poppler | Reporter: | William Bader <williambader> |
Component: | splash backend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
suggested patch to poppler-0.10.7/poppler/SplashOutputDev.cc
example of bad output from -level1sep rendering with -level1sep fixed but without the luminosity color[4] fix |
Description
William Bader
2009-06-01 14:40:47 UTC
Created attachment 26344 [details] [review] suggested patch to poppler-0.10.7/poppler/SplashOutputDev.cc My sample file is 3 MB and too large to post. Contact me at williambader@hotmail.com for a copy by email. the color[4] -> color[3] thing is already fixed in master. For the other issue i think i like better this diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index d24e77e..323d08e 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -2951,6 +2951,10 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, paperColor[0] = paperColor[1] = paperColor[2] = paperColor[3] = 0; splashOut = new SplashOutputDev(splashModeCMYK8, 1, gFalse, paperColor, gTrue, gFalse); +#else + } else if (level == psLevel1Sep) { + error(-1, "pdftops was built without CMYK support, -level1sep needs it to work in this file"); + return gFalse; #endif } else { paperColor[0] = paperColor[1] = paperColor[2] = 0xff; What do you think? Created attachment 26405 [details]
example of bad output from -level1sep
Created attachment 26406 [details]
rendering with -level1sep fixed but without the luminosity color[4] fix
Yes, your patch is better than mine because it reports an error only when PSOutputDev::checkPageSlice() is called and poppler has been compiled without SPLASH_CMYK. pdftops will process many files correctly, even without SPLASH_CMYK, as long as it does not call checkPageSlice(). I have attached a rendering with and without SPLASH_CMYK to show what happens in case anyone else runs into this. Patch commited, will be in next poppler version |
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.