<div dir="ltr">Thank you very much William, I will try to compile poppler today with your patch and see if it solves my issues.<div><br></div><div>Benjamin.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-04 19:42 GMT+01:00 William Bader <span dir="ltr"><<a href="mailto:williambader@hotmail.com" target="_blank">williambader@hotmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">I posted patches to add -preservecolorspace at <a href="https://bugs.freedesktop.org/show_bug.cgi?id=88971" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=88971</a><span class=""><br><br><div>>Thank you for your advices about git</div><div><br></div></span><div>pdftops works better if SPLASH_CMYK is set. I build the git source with </div><div> ./autogen; CXXFLAGS="-DSPLASH_CMYK=1 -O9 -ffast-math -fomit-frame-pointer -Wall -pipe" ./configure; make -j 4<br><div><br>William<div><br><div><hr><span class="">Subject: Re: [poppler] pdftops : issue with colorspaces with some printers (gray vs rgb)<br>From: <a href="mailto:benjamin.lefevre@photobox.com" target="_blank">benjamin.lefevre@photobox.com</a><br></span>Date: Wed, 4 Feb 2015 19:12:19 +0100<br>CC: <a href="mailto:poppler@lists.freedesktop.org" target="_blank">poppler@lists.freedesktop.org</a><br>To: <a href="mailto:williambader@hotmail.com" target="_blank">williambader@hotmail.com</a><div><div class="h5"><br><br><div>It would be very nice, William.</div><div>I would owe you one in return :)</div><div><br></div><div>Thank you for your advices about git.</div><div><br>Envoyé de mon iPhone</div><div><br>Le 4 févr. 2015 à 18:37, William Bader <<a href="mailto:williambader@hotmail.com" target="_blank">williambader@hotmail.com</a>> a écrit :<br><br></div><blockquote><div>


<div dir="ltr">I could make a patch to add a -preservecolorspace option tonight if no one has any objections.<div><br></div><div>>I'm a java developer, not comfortable in C/C++... not sure I would be able to make a pull-request in git.</div><div><br></div><div>The command to get the poppler source is "git clone git://<a href="http://git.freedesktop.org/git/poppler/poppler" target="_blank">git.freedesktop.org/git/poppler/poppler</a>" or download a stable release from <a href="http://poppler.freedesktop.org/" style="font-size:12pt" target="_blank">http://poppler.freedesktop.org/</a> (The stable releases need less infrastructure to build than the git source.)  Patches can be posted to <a href="https://bugs.freedesktop.org" style="font-size:12pt" target="_blank">https://bugs.freedesktop.org</a></div><div><br></div><div>William</div><div><br><div><hr>Date: Wed, 4 Feb 2015 18:05:03 +0100<br>Subject: Re: [poppler] pdftops : issue with colorspaces with some printers (gray vs rgb)<br>From: <a href="mailto:benjamin.lefevre@photobox.com" target="_blank">benjamin.lefevre@photobox.com</a><br>To: <a href="mailto:williambader@hotmail.com" target="_blank">williambader@hotmail.com</a><br>CC: <a href="mailto:poppler@lists.freedesktop.org" target="_blank">poppler@lists.freedesktop.org</a><br><br><div dir="ltr">Thank you William for your answer.<div><br><div>Actually I saw in the release notes ( <a href="http://poppler.freedesktop.org/releases.html" target="_blank">http://poppler.freedesktop.org/releases.html</a> ) what you mention. The 0.17.2 introduces the optimization you are talking about:</div><div><a href="http://poppler.freedesktop.org/poppler-0.17.2.tar.gz" style="color:rgb(173,173,173);font-family:Sans;font-size:medium;background-color:rgb(237,237,237)" target="_blank">poppler-0.17.2.tar.gz</a><span style="color:rgb(0,0,0);font-family:Sans;font-size:medium;background-color:rgb(237,237,237)"> (Mon Aug 15, 2011):</span><span style="color:rgb(0,0,0)">  PSOutputDev: Make level1sep, level2sep and level3sep write gray instead of rgb for gray images</span><br></div></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><font color="#000000">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.</font></div><div><span style="color:rgb(0,0,0)"><br></span></div></div><div><br><div>2015-02-04 17:44 GMT+01:00 William Bader <span dir="ltr"><<a href="mailto:williambader@hotmail.com" target="_blank">williambader@hotmail.com</a>></span>:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">I think that the cause is a patch that I submitted in May 2011 around the time of poppler 0.17.0.<div><br></div><div>Search for isGray in poppler/<a href="http://PSOutputDev.cc" target="_blank">PSOutputDev.cc</a></div><div><br></div><div>I use pdftops to make postscript files that will be printed on a newpaper press.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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 <a href="http://ghostscript.com/doc/current/Ps2pdf.htm" style="font-size:12pt" target="_blank">http://ghostscript.com/doc/current/Ps2pdf.htm</a></div><div><br></div><div>William<br><br><div><hr>Date: Wed, 4 Feb 2015 16:18:59 +0100<br>From: <a href="mailto:benjamin.lefevre@photobox.com" target="_blank">benjamin.lefevre@photobox.com</a><br>To: <a href="mailto:poppler@lists.freedesktop.org" target="_blank">poppler@lists.freedesktop.org</a><br>Subject: [poppler] pdftops : issue with colorspaces with some printers (gray       vs rgb)<div><div><br><br><div dir="ltr"><div><div dir="ltr"><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)">Hi everyone,</span></span></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)"><br></span></span></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px">My name is Benjamin and I am french.</span></font></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)"><br></span></span></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)">I'm new on this mailing list :)</span></span></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)"><br></span></span></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)"> I come to you for a question or maybe for a feature request (at this stage, I'm not sure).</span></span></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)"><br></span></span></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)">Please look at this pdf (dropbox: </span></span><a style="font-size:small" href="https://www.dropbox.com/s/yoj6h3o4irnlgun/source.pdf?dl=0" target="_blank"><font color="#222222">https://www.dropbox.com/s/yoj6h3o4irnlgun/source.pdf?dl=0 )</font></a></p><p style="font-size:12.8000001907349px"><a style="font-size:small"><font color="#222222"><br></font></a></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)">There are two monochrome images (in DeviceRGB in the pdf).</span></span></p><p style="font-size:12.8000001907349px"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(153,153,153)"><span style="color:rgb(17,85,204)"><br></span></span></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px">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).</span></font></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px"><br></span></font></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px">Is it possible to preserve DeviceRGB by executing pdftops? I did not manage to achieve it with the few available options provided by pdftops.....</span></font></p><a></a><br><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px">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? </span></font></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px"><br></span></font></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px">Thank you in advance,</span></font></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px"><br></span></font></p><p style="font-size:12.8000001907349px"><font color="#1155cc" face="Tahoma, sans-serif"><span style="font-size:13.3333330154419px">Benjamin.</span></font></p><a><font color="#222222"><br></font></a><br><a><font color="#222222"><br></font></a><br><a><br></a><br></div></div>
</div>
<br></div></div>_______________________________________________
poppler mailing list
<a href="mailto:poppler@lists.freedesktop.org" target="_blank">poppler@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a></div></div>                                         </div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></div></blockquote></div>
</div></div>