0

is it possible to convert specific cmyk colors in pdf generation process?

In my case I have simulated colors for the customer like for example gold with value C15 M30 Y70 K20. This color must be replaced for the printer who uses a real gold foil. There for the CMYK value must be changed to C0 M100 Y0 K0 as well as the color must be a solid color instead of process color and last but not least it must get a specific color name. In this case „goldfoil“.

So can ghost script look for the specific CMYK values and replace them?

Any hint would be very helpful

Chris
  • 17
  • 3

2 Answers2

0

No, you can't have Ghostscript alter colour values like that.

The correct way to do this is to create the PostScript program with a /Separation colour space, and define the alternate as a CMYK space with specific CMYK values to be used when the ink is not supported.

When the pritner supports the named ink 'goldfoil' it will print using the Gold ink (or foil in your case), when the named ink is not supported the printer will use the alternate space and colour values. That lets your customer see an approximation of the result on a CMYK printer, but your printer will be able to produce the true gold output.

KenS
  • 30,202
  • 3
  • 34
  • 51
  • Hey KenS thanks for your quick reply, i really appreciate it. I have the situation that we are building a web based product configurator where the customer can choose gold as color. I can only define rgb or cmyk values for that color. Do you have an idea what the best way would be to generate a pdf with the correct output? – Chris Dec 31 '19 at 08:59
  • Umm, well if the creating application won't let you create spot colours, I think you are (to be blunt) out of luck. From your question it seems like the printer (unsurprisingly) needs a /Separation ink with a /goldfoil colour name. The only way to do that is as a /Separation or /DeviceN colour. You can't do it if all you can specify is RGB or CMYK which means you can't (apparently) create a PDF file with the required ink name. Possibly I'm misunderstanding your web application. I don;'t know of any application which will find CMYK values and replace them with a named space. – KenS Dec 31 '19 at 12:00
  • You could use a PDF decompressing/repair tool such as MuPDF to decompress the PDF, then write some code to add a named ink (/goldfoil) with the correct definition for the alternate space, and then go through the file looking for usage of the 'c' operator and check if its using the specific values you want. You could then replace that with selection of the named colour space and value. Afterwards you could run the file back through MuPDF again to repair the xref table (it will be invalidated by altering the file) and recompress the PDF file. – KenS Dec 31 '19 at 12:02
  • Hey! Ok i think i have to ask the developer of the design tool if it is supporting spot color. I fear it isn't. So MuPDF could maybe a solution. As I am new to that kind of stuff: We want to process the print files automatically to the printer, will this correction process be very time consuming on the server? All PDF‘s are just one page... – Chris Dec 31 '19 at 12:25
  • I guess that depends what you consider time consuming. Its also hard to say because the lengthy part of the processing is going to be searching the content streams looking for specific CMYK values. It depends how long the streams are, rather than how many pages. Oh by the way, this approach won't work at all if the goldfoil colour is to be used in something other than simple linework, so images, possibly some kinds of gradients and so on. It might be easier for the developer to add spot colour support, if you're going to contact them anyway. Worth asking. – KenS Dec 31 '19 at 13:11
  • Hi, I talked to the developer. The generated file is an svg that will be converted to PDF. I am not sure if this is here the right place but maybe you can give me some input. What I found out so far is that SVG is supporting ICC Profiles. So I thought to link an ICC profile and give the color the special name like so: – Chris Jan 05 '20 at 10:26
  • I'm fairly certain that won't work. ISOCoated is the name of the media (the paper), and I'm reasonably certain that's a CMYK ICC profile you're pointing at (or would be if the URL worked ;-), so decalring a spot colour using an ICC profile seems unlikely to work to me. You would need a specific ICC profile to cover the spot colour, and I'm not enough of a colour expert to know how to go about that. – KenS Jan 05 '20 at 11:45
0

I talked to the developer. The generated file is an svg that will be converted to PDF. I am not sure if this is here the right place but maybe you can give me some input. What I found out so far is that SVG is supporting ICC Profiles. So I thought to link an ICC profile and give the color the special name like so:

 <color-profile name=„ISOcoated_v2_eci" xlink:href="http://swatches.example.com/ISOcoated_v2_eci.icc"/>
     <circle fill=„#9C9475 icc-color(ISOcoated_v2_eci, Goldfolie"/>

Also the correct cmyk values are missing so can I combine it like so?

<color-profile name=„ISOcoated_v2_eci" xlink:href="http://swatches.example.com/ISOcoated_v2_eci.icc"/>
     <circle fill=„#9C9475 device-cmyk(0.00, 1.00, 0.00, 0.00) icc-color(ISOcoated_v2_eci, Goldfolie "/>

or so?

<color-profile name=„ISOcoated_v2_eci" xlink:href="http://swatches.example.com/ISOcoated_v2_eci.icc"/>
     <circle fill=„#9C9475 icc-color(ISOcoated_v2_eci,0.00, 1.00, 0.00, 0.00) icc-color(ISOcoated_v2_eci, Goldfolie "/>
Chris
  • 17
  • 3