0

Problem

Following recommendations from a variety of discussion (see below), I have attempted to use ghostscript to convert a PDF file in an sRGB colorspace (generated by Inkscape) into a PDF/X-1a file, in a CMYK colorspace.

The command I have used is the following:

gs -dBATCH -dNOPAUSE -dPDFA -sDEVICE=pdfwrite \
  -sDefaultCMYKProfile=/usr/share/color/icc/colord/SWOP_TR005_coated_5.icc \
  -sOutputICCProfile=/usr/share/color/icc/colord/SWOP_TR005_coated_5.icc \
  -sProcessColorModel=DeviceCMYK \
  -sColorConversionStrategy=CMYK \
  -sColorConversionStrategyForImages=CMYK \
  -dRenderIntent=3 -dDeviceGrayToK=true \
  -dOverrideICC -dPDFACompatibilityPolicy=1 \
  -o cmyk.pdf rgb.pdf

Some of these switches may be unnecessary. Mostly, I am ignorant of their function, but have copied them from various sources in an attempt to find some solution to the application consistently generating files with sRGB output, rather than CMYK, as desired.

The sRGB color profile in the output is confirmed by ImageMagick, as follows:

$ identify -verbose cmyk.pdf
Image: cmyk.pdf
  Format: PDF (Portable Document Format)
  Mime type: application/pdf
  Class: DirectClass
  Geometry: 72x72+0+0
  Resolution: 72x72
  Print size: 1x1
  Units: Undefined
  Colorspace: sRGB
  Type: PaletteAlpha
  Base type: Undefined
  Endianess: Undefined
  Depth: 16/8-bit
<full content truncated>

Note that ghostcript is version 9.50, and is running under Linux Mint 20.0.

What might be a better usage of the application, to produce CMYK output?

References

5
  • Inskcape doesn't support CMYK colour. It's an SVG editor intended to create images for the web. However, you can edit a PDF (made in Inkscape) in Scribus, and convert the colours to CMYK manually. If you have raster images, Krita can convert these to CMYK, then you could import them into Scribus, and export PDF from there.
    – Billy Kerr
    Jan 5 at 13:44
  • @Billy The workflow in this case is to transform a PDF document from RGB to CMYK using ghostcript. The original PDF document having been generated by Inkscape is incidental.
    – epl
    Jan 5 at 17:07
  • In that case then, this seems to be more of a coding question rather than a graphic design question, and so it's technically off-topic here. Perhaps it would be more suited to SuperUser instead.
    – Billy Kerr
    Jan 5 at 17:42
  • On second thoughts, possibly StackOverflow would be even better as there are several thousand GhostScript questions.
    – Billy Kerr
    Jan 5 at 17:47
  • @BillyKerr: Surely this question would be suited for StackOverflow, as it relates to many other questions already in that community. Unfortunately, the posting of this exact question that I previously submitted was inexplicably deleted (and downvoted), with the suggestion that it should have been placed instead on SuperUser, which would be even less suitable than here. I have tried to have the post restored, but to no effect yet. If you are able to see the question posted on SO, I invite to vote for restoration.
    – epl
    Jan 6 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.