doutongwei4380 2018-06-27 09:56
浏览 334
已采纳

将rgb SVG渲染为cmyk PDF

I have an existing svg (note: version 1) with colors defined in the RGB colorspace, like this fill="#e6dfd9".

This svg should be used in a printable PDF, for which I'm currently using TCPDF. What would be the best approach to take to convert the svg to cmyk to be print-ready?

Couldn't find a solution using TCPDF for this, so thinking about using Imagemagick to convert the SVG first to cmyk, than use TCPDF to convert to PDF.

Already tried:

  • Using this syntax inside the SVG, which states both a rgb and cmyk color: rgb(255,0,255) device-cmyk(0.03, 0.90, 0.80, 0.00). Colors aren't rendered correctly, this might be due to the svg version.
  • 写回答

2条回答 默认 最新

  • doyrte8419 2018-08-10 14:38
    关注

    Conclusion of the research for now:

    SVG 1.0 is meant for screen display and should not contain cmyk colors, but solely RGB. For later SVG versions (1.1 or 2), icc color profiles or device-cmyk can solve this by containing both an rgb and cmyk value.

    In this case I've had to stick with SVG 1.0 so the color convertion should be done when preparing for print. This means the final colors will depend on the used color profile.

    Thanks anyone helping me out during my research!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?