Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/10/26)20171027 
aleray hi, I found this page: https://stackoverflow.com/questions/35596346/ghostscript-convert-pdf-into-cmyk-preserving-pure-black-for-text#3564689512:10.42 
  I'm interested to convert rgb pdfs to cmyk12:11.00 
  I want to preserve pure black12:11.09 
  if I understand correctly, they treat different kind of object with different icc profiles12:12.14 
kens The pdfwrite device doesn't do that, no.12:12.30 
aleray kens, so what about this stackoverflow answer? what does it do exactly12:13.53 
  no sure to understand what it achieves12:14.03 
kens I have no idea, as far as I can tell, it does nothing12:14.10 
  Well, more accurately, the Ghostscript part runs a PDF file and produces a PDF file, it set teh ColorConversionStrategy to CMYK, so any objects which are in RGB or 'special' colour spaces will be converted to CMYK. We leave Gray objects untouched.12:15.39 
  Very possibly the person who write the answer *thought* that the rendeing control 'SourceObjectICC' was doing something, but they are mistaken12:17.38 
tsr2 I have a PDF file that seems to kill ghostcript versions > 9.15.13:16.53 
kens Then I suggest you open a bug report13:17.08 
tsr2 If I use a debg build it throws a GCUnrecoverable error otherwise it loops.13:17.37 
  As it's got potentially confidential data I want to be cautious about putting it in a bug report. 13:18.20 
kens Is the file a sensible size ?13:18.41 
tsr2 If there is anything that I can do to narrow down the issue myself I woudl be interested in doing so.13:18.58 
  If there is anything that I can do to narrow down the issue myself I would be interested in doing so.13:19.04 
kens Are you a skilled PostScript programmer ?13:19.16 
tsr2 file size is < 100kB13:19.45 
  I am not a Postscript programmer.13:19.57 
kens Then frankly you dont have a hope of debugging it13:20.11 
  I'd suggest you open a bug report and email the file to me13:20.26 
tsr2 fair enough13:20.27 
kens ken.sharp at artifex dot com13:20.40 
tsr2 thank you13:20.56 
kens I can attach it and mark it private so that only Artifex staff can see it13:20.58 
aleray kens, thanks13:27.01 
kens Well, I can't say I was entirely helpful....13:27.18 
  But FWIW you're welcome13:27.24 
aleray More specifically, I'm interested to leave black text (r:0 b:0 g:0) black (c:0 m:0 y:0 b:100).13:28.03 
  I guess this is were it becomes problematic non?13:28.24 
kens If you set up the input and output ICC profiles appropriately that should be possible, I think13:28.24 
  But the pdfwrite device takes no account of object types, it simply passes them through the ICC CMS13:28.45 
tsr2 Ken, I've sent you an email. I am just registering in bugzilla for the bug report.13:34.07 
kens RIght let me cvheck my mail13:34.15 
  OK go it13:34.25 
  got*13:34.31 
  Yeha this doesn't look confidential (I do speak German) but all the same I'll attach it as private13:35.20 
  Doppler for beginners :-)13:35.45 
  Oh its a vetirnary seminar13:36.10 
  tsr2 well a quick run of the file to pdfwrite works for me with current code.... I'll try 9.2113:39.43 
  9.21 release version 32 and 64 bit works as well13:40.41 
  9.16 works 32 and 64-bit as well. Guess I'm going to need more information13:43.02 
  Oh you are running to *PostScript*, not PDF13:44.56 
  I'd guess the change was when we modified the pdftops shell script to use ps2weite instead of pswrite13:45.37 
aleray kens, I'm a little bit lost; maybe I should just reexplain what is my goal and let you propose a solution for that? I create rgb pdfs using a web browser. Thoses pdf need to be printed in offset. I'd like the color images to be converted into cmyk, the grayscale images to stay grascale and the black text to be pure black. Is there a way to achieve this using ghostrcipt or other means?13:50.08 
tsr2 Ken. Are you seeing the issue now, with pdftops?13:50.53 
kens Probably yes, but I'm not the colour expert. If you set up the input ICC profile (RGB) and the output ICC profile (CMYK) correctly then I believe it should be possible to have R=G=B map to CMY=0 K = R/G/B13:51.25 
  tsr2 I'm using the ps2write device13:51.34 
  And yes13:51.39 
  Its unable to add a long Unicode string representing a filespec to a dictionary13:51.57 
tsr2 It's always nice when you can reproduce it 13:53.54 
kens Well it certainly helps to fix it :-)13:54.05 
  I'm probably going to have to set this aside though, I'm in the middle of 2 other jobs already13:54.19 
tsr2 sure, I don't expect instant fixes when reporting issues to people I;m not paying ;-)13:55.30 
  sure, I don't expect instant fixes when reporting issues to people I'm not paying ;-)13:55.37 
  my last KDE bug report took 3 years to fix, IIRC13:56.50 
kens O.O13:56.54 
  Well we aren't 'usually' that bad13:57.02 
  I had hoped that disabling annotations would be a work-around for you, but it seems not13:57.32 
  One thing to note; the PDF file contains transparency, so at least some pages will end up as large images, no vector content13:58.02 
  Its definitely an annotation. One with an action13:59.36 
  Ah, we're trying to find a place to split the string, because its more than 256 bytes, and for some reason we can't.14:01.19 
  tsr2 I can sort of see the problem, shouldn't be hard to fix, but like I say I have to finish the stuff I'm doing right now. You'll get an email when the bug status changes.14:03.57 
tsr2 thanks Ken. Much appreciated.14:04.22 
kens NP14:04.30 
aleray kens, thqnks for your help14:14.56 
kens NP14:15.16 
aleray probably come back later after I processed the info I have now14:15.35 
kens Our colour expert should be online 'soon' (west coast US) and may be able to say something more helpful14:15.44 
aleray what is his name?14:15.55 
kens He'll be online as mvrhel_laptop probably14:16.12 
aleray thanks kens 14:27.45 
  hello mvrhel_laptop 14:27.55 
  I asked a question about color conversion a little bit earlier. Kens advised to ask to you14:28.21 
  here was the question14:28.28 
  kens, I'm a little bit lost; maybe I should just reexplain what is my goal and let you propose a solution for that? I create rgb pdfs using a web browser. Thoses pdf need to be printed in offset. I'd like the color images to be converted into cmyk, the grayscale images to stay grascale and the black text to be pure black. Is there a way to achieve this using ghostrcipt or other means?14:28.31 
kens NB this is for *pdfwrite*, not rendering14:28.52 
aleray I found some clues there https://stackoverflow.com/questions/35596346/ghostscript-convert-pdf-into-cmyk-preserving-pure-black-for-text#3564689514:29.27 
mvrhel_laptop if you are talking about pdfwrite, I will leave you to kens.....14:31.43 
kens LOL14:31.49 
  pdfwrite is simple in this regard14:31.56 
  It does nothaing for object types14:32.02 
  Whatever teh CMS does for RGB->CMYK conversion is all it can deal with14:32.19 
  If you can arrange a conversion where R=G=B -> C==M=Y=0 and K = RGB then it will work14:32.44 
  I would have thought that was possible with careful selection of ICC profiles, but.....14:33.05 
  Not my field14:33.08 
mvrhel_laptop kens: question for pdfwrite. does it pay attention to the object dependent icc profiles in doing its color conversions?14:34.50 
kens No14:34.56 
  Everything goes through the 'default' conversion path14:35.23 
mvrhel_laptop hmm. I should probably do a little testing with this14:35.43 
kens IIRC this is somethign we've talked about before, but its never been worked on14:36.02 
aleray fyi this is what we use for now: https://gitlab.com/medor/rgb2cmyk/blob/master/bin/rgb2cmyk.sh14:38.50 
  looking for a cleaner solution14:38.56 
kens Using PDftops is a really bad idea14:40.14 
aleray because of the pdf -> ps -> pdf conversion?14:41.05 
kens Yes14:41.09 
  Lots of potential for losing fidelity, not least if the original PDF has any transparency14:41.32 
aleray this is why I'm around :) yes we have issues with transparency14:41.54 
mvrhel_laptop I have to grab some breakfast and take care of a couple other things here. I will take a quick look later to see if the cmm workflow with pdfwrite makes use of the object dependent color management stuff. I actually suspect it does14:48.10 
kens I'm not sure how, I don;t recall anythign being passed by pdfwrite to tell the CMS what object type is beign processed14:48.45 
mvrhel_laptop In that case you can control to what ever level you need but you will have to design the ICC profile to do it14:48.48 
  kens: the information is in dev->graphics_type_tag14:52.22 
kens Hmm I didn't realise I set that14:52.33 
mvrhel_laptop so when you request a link, it should hand you back the correct one14:52.38 
  That is the question then14:52.50 
  If it is getting set, you will get back a link using the special profile14:53.02 
kens It *may* be set by the interpreter, I'm not certain14:53.03 
mvrhel_laptop I think gs_fill is doing it14:53.21 
  iirc14:53.24 
chrisl The graphics library sets the tag type14:53.53 
kens Oh then it probably does work14:54.06 
mvrhel_laptop ah ok14:54.12 
  the man with the answers14:54.16 
  so there, it should all work14:54.23 
chrisl Assuming that pdfwrite doesn't have it's own set_tag method, that does something "odd"14:55.47 
mvrhel_laptop so aleray needs to read the icc white paper14:55.49 
kens I don't think pdfwrite does anything with tha14:56.01 
chrisl I can't imagine why it would use anything other than the default14:56.31 
mvrhel_laptop aleray: So I would suggest you look this over14:57.57 
  https://www.ghostscript.com/doc/9.22/GS9_Color_Management.pdf14:58.08 
  especially the first part on usuage14:58.45 
  You should be able to achieve your goals with that14:59.06 
aleray mvrhel_laptop, thanks15:06.02 
  I will start with that15:06.13 
mvrhel_laptop aleray: If you have issues come back and ask15:08.23 
aleray ok!15:18.52 
 Forward 1 day (to 2017/10/28)>>> 
ghostscript.com #mupdf
Search: