3

Is it possible to pre-process (in batch) PDFs that are in CMYK format to separate out into spot colours?

I have a collection of PDFs that are in CMYK but I require them to be in a 2 spot colour format.

The colours are red and black. The black (K) is fine, but the red spot needs to be a merge of the Magenta & Yellow.

Is this possible at all? I'd prefer something that would be able to separate spots based on a given colour rather than merging colours as that becomes very limited.

I've looked in adobe acrobat X pro and that doesn't seem to do what I want. I could probably do it manually in photoshop but it would be a long winded process for the large amount of PDFs I have.

TheStoneFox
  • 3,007
  • 3
  • 31
  • 47
  • I'm not sure I understand what your final objective is. You have a .pdf tht has multiple colors and you want 2 colors. When you say separated, are you talking outputting 2 pieces of b&w film? I just answered another postscript question regarding redefining a postscript operator. It would seem that a similar technique might be used to redefine the setgray, setrgbcolor and/or setcmykcolor to redefine colors. [link]http://stackoverflow.com/questions/14856981/ghostscript-postscript-pswrite-is-encoding-text/14888816#14888816 – Fred F Feb 15 '13 at 05:40
  • I'll try and give a simple example: I have a PDF generated which is RGB (but ultimately it is just Red Text and Black Text in the PDF). The Red and Black are composed of RGB elements inside the PDF. If I preflight it to CMYK it becomes K = all black text M+Y = Red text What I want is to preflight it so the PDF ink manager shows C=empty Y=empty M=empty K=black [spot red]=red – TheStoneFox Feb 16 '13 at 08:32
  • I'm still not sure where you trying to get or what parameters you are limited to. Postscript allows the setrgbcolor to be redefined with a purposely defined setcmyk, but such action is unnatural to postscript. If the context allows a user defined header to be sent first, it is easy. If you can define a specific page size to the action, it is easy. If you don't mind rebooting the RIP, it is easy. But if you expect magic to just happen, magic is impossible in our world. On a past job, I had maps which were designed in red, but each edition required different colors to print. this can be done. – Fred F Feb 16 '13 at 15:58
  • I'm still confused what the end result you desire is. – Fred F Feb 16 '13 at 15:59
  • The result is to take a PDF that has it's colours made up of an RGB process, and have the final PDF ink breakdown made out of only 2 colours (in this case a Black ink and a Red ink) So if you were to make print plates out of the PDF you would get a solid plate for the black and a solid plate for the red (i.e. red is not made up of CMYK or RGB colours) – TheStoneFox Feb 17 '13 at 19:22

2 Answers2

1

I'm guessing this problem was long solved, but just for completeness; yes, this can be done. There are a number of commercial tools that do exactly this very easily actually.

1) If I'm not mistaken, the latest version of Adobe Acrobat actually contains a lot more PDF file correction possibilities than previous versions, which means it should be able to do this.

2) There are tools like callas pdfToolbox (warning, I'm affiliated with this company/product) that can pre-process a PDF file pretty much any which way you want.

In general though I think the first question would be why you go through the RGB to CMYK step - the tools than can do this kind of remapping would equally be able to simply go from Black and Red RGB directly to two named spot colors, avoiding the unnecessary CMYK conversion.

By the way, if what you are trying to obtain is a PDF where you can switch one color off easily (such as for example to hide the correct answers), there are probably better ways to do this. Such as putting all red text on one layer for example, while putting all black text on a different layer (or OCG - optional content group as PDF calls them). This would give you to capability to switch colored text on or off at will, even in something like Adobe Reader.

David van Driessche
  • 6,602
  • 2
  • 28
  • 41
  • Thanks for your response, it hasn't been answered to something that provides me a workable (easy) solution. Would you be able to provide in your answer the steps of how to achieve the goal in a step by step guide (in either Acrobat or Pitstop) so I can follow the steps and achieve the goal. I'd need them in CMYK + Spot as it will eventually go to print in a litho production so RGB + spot wouldn't be any good there. Thanks a lot – TheStoneFox Apr 15 '13 at 08:27
  • I've not been able to achieve my goal in Adobe Acrobat Professional XI and don't seem to see a way of how to do it. I'd be grateful if you could outline in your answer how to achieve my goal in either Adobe Acrobat or Pitstop. If I can achieve my goal with a provided answer then I will accept the answer and mark this as resolved. – TheStoneFox Apr 16 '13 at 10:47
  • I've downloaded the Desktop version of PDFToolbox and in the Fixups menu there is an option to replace CMYK colours (by providing the CMYK breakdown values and a tolerance for fuzzy matching) and then you choose a colour to swap it out for (in my case a named colour spot red with a fall back CMYK value). So you can do it in PDFToolbox but not (as far as I can see) in Acrobat Professional XI. I'll mark this as the answer – TheStoneFox Apr 23 '13 at 09:31
  • I tried different options and different programs, included suggested ones, and I failed to change PDF document with, say black and CMYK=1,0,0,0, to K and arbitrary spot color. – Pygmalion Nov 05 '13 at 19:11
  • If you have an example document, I'll be happy to take a look – David van Driessche Nov 06 '13 at 14:16
0

This is the simple implementation which will print solid black or anything that is not black. Depending on your needs, it may need to get more complex. Without knowing more, I took the brute force approach of using exitserver. exitserver allows the default operation of the RIP to be redefined. To restore the RIP to its normal operation, you need to reboot the rip or write another exit server routine to undefine the server modification.

The routine is installed in the rip by sending the exitserver postscript code. For a PC, this can be done with a DOS copy command to the printers share. There are also sendps programs which can be found on the web to sent the file to the device.

copy redef1.ps \\127.0.0.1\psprinter

This exitserver routine defines a /setcmykcolor function in the userdict, which will take precedence over the setcmykcolor in the system dict. there will 4 numbers on the stack where the last in will be the black. The back value is duplicated and compared to zero. If the black is not zero, the black block will be performed, otherwise the not black will execute. 0 setgray=black and 1 setgray=white, so as the block exists below, black will print as black and everything else will print as white.

%!
serverdict begin 0 exitserver
userdict begin /setcmykcolor 
{
    dup 0 ne
    {
        %black
        0 setgray
        pop pop pop pop
    }
    {
        %not black
        1 setgray
        pop pop pop pop
    }ifelse
} def end

By reversing the value of setgray, the black will not print and everything else "not black" would print.

%!
serverdict begin 0 exitserver
userdict begin /setcmykcolor 
{
    dup 0 ne
    {
        %black
        1 setgray
        pop pop pop pop
    }
    {
        %not black
        0 setgray
        pop pop pop pop
    }ifelse
} def end

It won't matter what program you print from. whichever version of the exitserver is last loaded, will be the way the output will print.

Here is a simple .ps example

%!PS-Adobe-3.0 
%%Title: mwe.ps
%%Pages: 001
%%BoundingBox: 0 0 595 842
%%EndComments
%%Page: 1 1
%%PageBoundingBox: 0 0 595 842
/Times-Roman findfont 72 scalefont setfont
0 0 0 1 setcmykcolor
0 20 moveto (black) show
0 1 0 0 setcmykcolor
0 40 moveto (not black) show
0 0 0 1 setcmykcolor
0 60 moveto (black) show
1 0 0 0 setcmykcolor
0 80 moveto (not black) show
0 0 0 1 setcmykcolor
0 100 moveto (black) show
0 1 1 0 setcmykcolor
0 120 moveto (not black) show

showpage

The output will display only "black" or "not black", but the text overprints, so you will see a ghost image of whichever color is not printing.

This is an exitserver to restore the RIP to use the normal setcmykcolor

%!
serverdict begin 0 exitserver
userdict /setcmykcolor undef 

As stated at the beginning, this is a simple implementation, such as allowing tints of black and not black There could also be variations of colors where small amounts of black mixed with color could fool the simple routine to where a dark red 0 .87 .75 .1 setcmykcolor would be defined as black, where it probably should be not-black.

Fred F
  • 1,027
  • 1
  • 9
  • 18
  • That is a hardcore answer! I was hoping for something along the lines of...You do this in ghostscript, etc :) – TheStoneFox Feb 19 '13 at 07:21
  • I've never seen anyone output plates with ghostscript. :P The answer represents the generic way postscript separates color, where the standard method is redefined with a modified method. For ghostscript, The 15 lines would be copied into files with the exitserver line removed and 2 files would be sent into ghostscript "onlyblack.ps youfile.pdf" & "notblack.ps yourfile.pdf". This would produce b&w output. If you wanted an RGB file out of ghostscript, you'd need a different header. The answer isn't hardcore, it's postscript! – Fred F Feb 19 '13 at 15:53
  • While this is an excellent answer, it's a bit too technical for me, so I've opted for the PDFToolbox solution. – TheStoneFox Apr 23 '13 at 09:32