Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Helge Blischke Newsgroups: comp.lang.postscript Subject: Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? Followup-To: comp.lang.postscript Date: Mon, 06 Jun 2011 11:26:43 +0200 Lines: 169 Message-ID: <953kqlFqd3U1@mid.individual.net> References: <208ecf3d-3629-4672-9a3e-135e44701d6b@p13g2000yqh.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Trace: individual.net MIcAiVnK7eGdTvRKB1+g3Aqj46f7owjyGnLjNfPWbTu7NshHut Cancel-Lock: sha1:FvwZ8lM1pQL3F4b3YJPwJ9ddfYk= User-Agent: KNode/0.99.01 Xref: x330-a1.tempe.blueboxinc.net comp.lang.postscript:232 sdaau wrote: > Hi all, > > I basically have the problem with print of some slides from > OpenOffice. The problem is that OpenOffice exports the PDF of the > slides as an RGB PDF, where the text color is R:0, G:0, B:0 - and > usually when I send that to the printer, they complain that what > should be plain black extends into all four (CMYK) channels, and so I > have to pay more for the ink. > > So the problem is - how would I convert a RGB PDF with R:0, G:0, B:0 > into a CMYK pdf where the same color is plain black (C:0, M:0, Y:0, K: > 100)? I posted a similar question on > > http://stackoverflow.com/questions/6241282/converting-pdf-to-cmyk-with- identify-recognizing-cmyk > > ... although that question is more Latex oriented. So here, I'll try > to provide my OpenOffice test case: > > * Open OpenOffice Impress, use Empty Presentation, click Create > * Add some text for 'title' and 'text' > * Click File/Export as PDF; call this PDF blah-slide.pdf > > At this point, close and reopen OpenOffice, for yet another slide > pdf: > * Open OpenOffice Impress, use Empty Presentation, click Create > * Add some text for 'title' and 'text' > * Click Insert/Picture/From File... and insert whatever PNG image > ** I used `convert -size 10x10 xc:red img.png` to generate a PNG image > to insert > * Click File/Export as PDF; call this PDF blah-slideP.pdf > > At this point, we can run ImageMagick's `identlfy` on both pdf's, and > we'll get: > > $ identify -verbose blah-slide.pdf | grep -i 'type\|color' > Type: Grayscale > Base type: Grayscale > Colorspace: RGB > Background color: white > Border color: rgb(223,223,223) > Matte color: grey74 > Transparent color: black > > $ identify -verbose blah-slideP.pdf | grep -i 'type\|color' > Type: TrueColor > Colorspace: RGB > Background color: white > Border color: rgb(223,223,223) > Matte color: grey74 > Transparent color: black > > Now, I'm aware that `identify` in principle works on raster images, > but I cannot find any other application that will provide similar > color information for PDFs (any other suggestions?) > > Furthermore, the only check I have for CMYK separations for now (any > other suggestions?), is to use the `tiffsep` device of GhostScript: > > $ gs -sDEVICE=tiffsep -dNOPAUSE -dBATCH -dSAFER -dFirstPage=1 - > dLastPage=1 -sOutputFile=p%08d.tif blah-slide.pdf && eog p00000001.tif > > (or) > > $ gs -sDEVICE=tiffsep -dNOPAUSE -dBATCH -dSAFER -dFirstPage=1 - > dLastPage=1 -sOutputFile=p%08d.tif blah-slideP.pdf && eog > p00000001.tif > > Of course, both of these show that the black color of the text is > 'rich' black - on all four CMYK plates - instead of a plain 'black', > just in the K channel... > > ////// > > > So, now I finally try the command line I found in > http://www.productionmonkeys.net/guides/ghostscript/examples for > converting, as it says, "Color PDF to CMYK" - for both of these PDFs > (without and with an embedded image): > > $ gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite - > sColorConversionStrategy=CMYK -dProcessColorModel=/DeviceCMYK - > sOutputFile=blah-slide-out.pdf blah-slide.pdf > > $ gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite - > sColorConversionStrategy=CMYK -dProcessColorModel=/DeviceCMYK - > sOutputFile=blah-slideP-out.pdf blah-slideP.pdf > > > .. And here is now the interesting thing - if I try to run `identify` > again - *only* the pdf containing an image is the one recognized as > CMYK: > > $ identify -verbose blah-slide-out.pdf | grep -i 'type\|color' > Type: Palette > Colorspace: RGB > Background color: white > Border color: rgb(223,223,223) > Matte color: grey74 > Transparent color: black > > $ identify -verbose blah-slideP-out.pdf | grep -i 'type\|color' > Type: ColorSeparation > Base type: ColorSeparation > Colorspace: CMYK > Background color: white > Border color: cmyk(223,223,223,0) > Matte color: grey74 > Transparent color: black > > > However, regardless of how they are reported, if I try to view their > separations: > > $ gs -sDEVICE=tiffsep -dNOPAUSE -dBATCH -dSAFER -dFirstPage=1 - > dLastPage=1 -sOutputFile=p%08d.tif blah-slide-out.pdf && eog > p00000001.tif > > $ gs -sDEVICE=tiffsep -dNOPAUSE -dBATCH -dSAFER -dFirstPage=1 - > dLastPage=1 -sOutputFile=p%08d.tif blah-slideP-out.pdf && eog > p00000001.tif > > ... I can still see that both of these PDFs still feature the text in > rich black, in all four color separations. > > > So, I guess my questions can be summed up as: > > * How can I convert a rich black text color in an RGB pdf - into a > plain black text color in a CMYK pdf? > * Why do I need an image in the slide, so that `identify` recognizes > the "converted" CMYK pdf as being really CMYK? > > (* Are there any other alternative free tools for: conversion of RGB > to CMYK pdf; and: checking the print separations of any PDF?) > > As a final note: I guess this kind of thing may have something to do > (and be achievable) with ICC profiles, which unfortunately I don't > understand very much - and I've had a lot of problems finding example > command lines; so if there is such a solution, an example command line > will be much appreciated. > > > Thanks in advance for any responses, > Cheers! I did the following with PDFs generated by both LibreOffice and LaTex: pdftops source.pdf test.ps | grep -i cs | grep Device and the result was in both cases like /DeviceGray {} cs /DeviceGray {} CS /DeviceGray {} cs /DeviceGray {} CS /DeviceGray {} cs /DeviceGray {} CS /DeviceGray {} cs /DeviceGray {} CS As the pdftops utility (from the xpdf suite) preserves the PDF color spaces, this means that - at least the text - is *not* "rich black". I rather suspect that your print provider uses some unusual color conversion in his workflow. Helge