[poppler] pdftops : issue with colorspaces with some printers (gray vs rgb)

Benjamin Lefevre benjamin.lefevre at photobox.com
Wed Feb 4 09:05:03 PST 2015


Thank you William for your answer.

Actually I saw in the release notes (
http://poppler.freedesktop.org/releases.html ) what you mention. The 0.17.2
introduces the optimization you are talking about:
poppler-0.17.2.tar.gz
<http://poppler.freedesktop.org/poppler-0.17.2.tar.gz> (Mon
Aug 15, 2011):  PSOutputDev: Make level1sep, level2sep and level3sep write
gray instead of rgb for gray images

Yes it makes a problem for me, and it would be great to have this feature.
How can I proceed to have it?  I'm a java developer, not comfortable in
C/C++... not sure I would be able to make a pull-request in git.


2015-02-04 17:44 GMT+01:00 William Bader <williambader at hotmail.com>:

> I think that the cause is a patch that I submitted in May 2011 around the
> time of poppler 0.17.0.
>
> Search for isGray in poppler/PSOutputDev.cc
>
> I use pdftops to make postscript files that will be printed on a newpaper
> press.
>
> My application was being sent PDFs with embedded logos that looked gray
> but were actually in RGB color space, and they were not getting separated
> correctly on color pages.
>
> I added a check in PSOutputDev that if every pixel of a RGB bitmap was
> equal R, G, B, it will be written as a grayscale bitmap, which fixed my
> separation problems and made the files smaller.
>
> If that makes a problem for you, it should be possible to add a command
> line option to control the RGB to grayscale conversion, maybe similar to
> some of the distiller options in ghostscript
> http://ghostscript.com/doc/current/Ps2pdf.htm
>
> William
>
> ------------------------------
> Date: Wed, 4 Feb 2015 16:18:59 +0100
> From: benjamin.lefevre at photobox.com
> To: poppler at lists.freedesktop.org
> Subject: [poppler] pdftops : issue with colorspaces with some printers
> (gray vs rgb)
>
>
> Hi everyone,
>
>
> My name is Benjamin and I am french.
>
>
> I'm new on this mailing list :)
>
>
>  I come to you for a question or maybe for a feature request (at this
> stage, I'm not sure).
>
>
> Please look at this pdf (dropbox: https://www.dropbox.com/s/yoj6h3o4irnlgun/source.pdf?dl=0
> ) <https://www.dropbox.com/s/yoj6h3o4irnlgun/source.pdf?dl=0>
>
>
> There are two monochrome images (in DeviceRGB in the pdf).
>
>
> After executing 'pdftops', the images are cut in half, with the top part
> in DeviceRGB and the bottom in DeviceGray. This causes colorimetric issues
> on some of my printers (most of them in fact).
>
>
> Is it possible to preserve DeviceRGB by executing pdftops? I did not
> manage to achieve it with the few available options provided by pdftops.....
>
> Or would it be possible to have a new option in poppler (pdftops in my
> case) to preserve colorspaces, and to not optimize the monochrome images in
> DeviceGray?
>
>
> Thank you in advance,
>
>
> Benjamin.
>
>
>
>
>
> _______________________________________________ poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>



-- 

*Benjamin Lefevre*      Senior Software Engineer / iWays & iRender

*Email                          *benjamin.lefevre at photobox.com

*Address                      *37-39 rue de Beauce - 78500  Sartrouville
(France)

*Phone                         *+33 (0)1 30 86 80 43

[image: PHOTOBOX]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20150204/dab386a5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3305 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20150204/dab386a5/attachment-0001.jpg>


More information about the poppler mailing list