RGB to CMYK colorspace not available in Libre

Try out pdf24. They say you can save as CMYK pdf.
pdf24 creates a virtual printer, there are lots of customizing features.

@Mike2 Kagaskri – This option of print text in black converts Magenta to black. However, the black is C0M0Y0K100. Halfway through. Yet the full solution is awaited. Nonetheless, thanks for taking time to comment.

@Grantler – pdf24 is meant for Windows. I don’t find any link or mention of it for Linux/Ubuntu. Our files are created in Libre on Ubuntu. When Libre is used in Windows and files are opened there, the text shows some distortion, overlapping etc for Devanagari Script. That goes beyond acceptable limits. Hence, running Libre in Windows is out of question. Thanks for the suggestion.

Do you pay attention to what you are told? I referred to oweng’s answer.

@Mike2 Kagasnki – I tried Oweng’s answer now. The output it gives was tested in Photoshop and Gimp. There is no desired color combination like for Magenta - C-0, M-100, Y-0, K-0 and for Black text- C-0, M-0, Y-0, K-100

That might mean that RGB magenta in LO does not map to C-0, M-100, Y-0, K-0…
Unfortunately, LO internally only uses RGB (which is mentioned in documentation).
GhostScript does not have color replacement capabilities itself. I wonder if there is another tool that has.

(waiting for another permutation of my name :wink: )

@mikekaganski (Sorry for the name confusion.) Very sorry to know that the solution is nor near. However, few brilliant guys have figured out some solution. I fail to understand the technical jargon. Pl see if something can be done.

Link-1

Link-2

According to this page, your PDF file can be converted to CMYK using either Adobe Acrobat Pro or Foxit PDF Editor.

@GooglyGoogly: citing the first link, pdflatex automatically does that (with the xcolor package) for all fonts and drawn objects - isn’t that what you actually need? The rest of it was discussion about how to proceed with embedded images that were also in RGB.

@librebel: the problem is not with converting to CMYK, but also with ensuring that black is 100% black and magenta is 100% magenta in resulting converted file (which isn’t guaranteed when converted from RGB IIUC).

@mikekaganski – You are right. You have rightly stated the problem and the requirement. Also your response to @librebel is exactly what I am trying to say.

@GooglyGoogly: attach a sample PDF here, please. Both original and after converting to CMYK, if possible.

@mikekaganski – PDF attachment is not allowed here.

Can’t be, but even if so, you could attach a zip

@mikekaganski – zip to is prohibited. When zip or any compressed format is attached, It shows a list of permitted formats and doesn’t take the files. Dropbox - original.pdf - Simplify your life
Dropbox - Owengswayonoriginal.pdf - Simplify your life
Pl get the files from dropbox. This are sample files created for easy handling. Actual file is here Dropbox - File Deleted

Could you try to skip the -sColorConversionStrategy=CMYK -sColorConversionStrategyForImages=CMYK from the oweng’s command line?

@mikekaganski – Tried as suggested. These are the results.
Original pdf from Libre - Magenta is shown as - C-39, M-63, Y-0, K-4. Black is shown as - CMY-0, K-100.
Converted without Strategy - Magenta is shown as - C-39, M-63, Y-0, K-4. Black is shown as - CMY-0, K-100.
Converted with Strategy - Magenta is shown as - C-26, M-82, Y-0, K-0. Black is shown as - C-72, M-67, Y-67, K-88.

As per the latest suggestion to drop the color conversion strategy, Magenta is better, but black is screwed.

I suppose that a correct ICC profile is required. But I have no experience with this

@mikekaganski – Am indebted to you, Mike for your continuous guidance and support. Hoping for some solution from some quarter. I believe, this is not impossible. Community is strong. Someone will contribute.

Maybe you could try to do it another way: create a simple PDF (using any tool) with required CMYK colors; use ghostscript to convert it to RGB PDF; then check resulting colors in RGB and apply those to your LibreOffice text files? (Of course, it would only work if the conversion from CMYK to RGB and from RGB to CMYK is reversible in ghostscript)