Summary: | [PATCH] Add a pdftops -preservecolorspace option to suppress optimization to DeviceRGB color space | ||
---|---|---|---|
Product: | poppler | Reporter: | William Bader <williambader> |
Component: | utils | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | benjamin.lefevre, williambader |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Patches to add -preservecolorspace
my print without preservecolorspace option my print without preservecolorspace option (zoom) my print with preservecolorspace option Alternate patch that adds -optimizecolorspace Updated alternate patch to add -optimizecolorspace Updated alternate patch to add -optimizecolorspace with man page |
Description
William Bader
2015-02-04 18:21:08 UTC
I would expect that by default pdftops should produce output that always works. Any optimizations that may degrade the output in some cases should be disabled by default and require an option to be enabled. In most cases pdftops is invoked automatically by cups. Users are not able to easily change pdftops options or recognize that when there is a problem with the printing output that the pdftops options require tweaking. I am building postscript pages from EPS files. Some of the EPS files are created from third-party PDFs by pdftops. I made the optimization because one of the sources of PDFs liked to embed gray logos as RGB images, and when the resulting EPS files got on my pages, Adobe pre-press applications flagged the RGB images and did a bad color separation. I think that the underlying issue is that printing RGB images to a CMYK printer is not a good idea. The optimization has been in pdftops for over 3 years, and so far, only one person has had a problem, while on the other hand, at one site where I installed it, it has been processing about 1000 files a week including fixing several files each week with RGB images. So the optimization has about 300 wins to 1 loss. In any case, if you think that it is better, I can make a new patch to make the default preserve the color space and add a -optimizecolorspace option that enables the optimization. I noticed the problem with source.pdf is the PS output is using a fallback image which is output in two parts each with a different colorspace. We should keep the fallback images all in the same colorspace. Created attachment 113199 [details]
my print without preservecolorspace option
Created attachment 113200 [details]
my print without preservecolorspace option (zoom)
Created attachment 113201 [details]
my print with preservecolorspace option
Hello guys Many thanks to you. And a special thank to William for your patch. It definitively solves my issue encountered on some printers. Please look at the pictures in attachments. With and without preservecolorspace option. Now, my 2 cents. I'm agree with Adrian, I would propose to not change the colorspaces by default, and have a new option to propose optimization of colorspaces. Do you think this request has a chance to be provided with a future release of poppler? Thanks for testing it. Yes, Adrian has a good point. I will make an -optimizecolorspace tonight where the default is to preserve the color space and you need to use the option to optimize it. I am not a poppler developer, so the decision of which patch to apply is not up to me. William :-) Created attachment 113208 [details] [review] Alternate patch that adds -optimizecolorspace This patch reverts the optimization change from a few years ago. pdftops will preserve the color space by default. The patch provides the new option -optimizecolorspace to enable the optimization. You're not initializing optimizeColorSpace in PSOutputDev Created attachment 113211 [details] [review] Updated alternate patch to add -optimizecolorspace Sorry about that. Here is a new patch. Can you please add the option to the manpage? Created attachment 113213 [details] [review] Updated alternate patch to add -optimizecolorspace with man page I added a man page entry. By the way, after I added the initialization, I checked that valgrind was clean when running pdftops on source.pdf with and without the new option. Also, I noticed that -aaRaster is not in the man page. I didn't add it in the patched here to avoid confusion. If you want, I can add man page patches to https://bugs.freedesktop.org/show_bug.cgi?id=85934 Is there a preferred method for setting boolean options? The pdftoxxx utilities have some flags like -preload that are set just by using them and others like -aaVector that take yes/no parameters. Yes please, add the man page change there, about flag or text, no idea, just check what's the most common :D Pushed Thanx guys Hi guys, Is there a chance that the bug is fixed in the next release? if yes, do you know when it will occur? It seems there is about one release per month, doesn't it? Yes, yes |
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.