Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #232

Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black?

From Helge Blischke <h.blischke@acm.org>
Newsgroups comp.lang.postscript
Subject Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black?
Followup-To comp.lang.postscript
Date 2011-06-06 11:26 +0200
Message-ID <953kqlFqd3U1@mid.individual.net> (permalink)
References <208ecf3d-3629-4672-9a3e-135e44701d6b@p13g2000yqh.googlegroups.com>

Followups directed to: comp.lang.postscript

Show all headers | View raw


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

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? sdaau <sd@imi.aau.dk> - 2011-06-05 22:49 -0700
  Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? Matti Vuori <xmvuori@kolumbus.fi> - 2011-06-06 08:41 +0000
  Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? Helge Blischke <h.blischke@acm.org> - 2011-06-06 11:26 +0200
    Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? sdaau <sd@imi.aau.dk> - 2011-06-06 04:29 -0700
  Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ken <ken@spamcop.net> - 2011-06-06 14:05 +0100
    Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? sdaau <sd@imi.aau.dk> - 2011-06-06 08:34 -0700
      Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ken <ken@spamcop.net> - 2011-06-06 17:28 +0100
      Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ken <ken@spamcop.net> - 2011-06-07 10:21 +0100
        Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? sdaau <sd@imi.aau.dk> - 2011-06-09 05:28 -0700
          Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ken <ken@spamcop.net> - 2011-06-09 14:00 +0100
            Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? sdaau <sd@imi.aau.dk> - 2011-06-09 06:48 -0700
              Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ken <ken@spamcop.net> - 2011-06-09 16:06 +0100
          Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2011-09-16 18:33 -0400
    Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? sdaau <sd@imi.aau.dk> - 2011-06-06 09:17 -0700
      Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? Helge Blischke <h.blischke@acm.org> - 2011-06-06 19:30 +0200
        Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ole.hoppe@gmail.com - 2012-01-25 06:40 -0800
          Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? Helge Blischke <h.blischke@acm.org> - 2012-01-25 16:09 +0100
            Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ole.hoppe@gmail.com - 2012-01-26 06:41 -0800
              Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? Helge Blischke <h.blischke@acm.org> - 2012-01-26 21:07 +0100
              Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ole.hoppe@gmail.com - 2012-01-26 12:57 -0800
            Re: PDF to PDF (gs?): rich RGB black to plain K (CMYK) black? ole.hoppe@gmail.com - 2012-01-26 12:58 -0800

csiph-web