Bug 276845 - open cmyk pdfs in cmyk color mode
Summary: open cmyk pdfs in cmyk color mode
Status: RESOLVED UPSTREAM
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 2.3
Platform: Mandriva RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 18:13 UTC by Helge Hielscher
Modified: 2019-10-04 14:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
CMYK PDF (made with Scribus) (1.67 KB, application/pdf)
2011-06-30 18:13 UTC, Helge Hielscher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helge Hielscher 2011-06-30 18:13:58 UTC
Created attachment 61491 [details]
CMYK PDF (made with Scribus)

Version:           2.3 (using KDE 4.6.4) 
OS:                Linux

Please import PDFs that are created in CMYK color space as CMYK Krita image.

Reproducible: Didn't try

Steps to Reproduce:
open attached PDF in Krita

Actual Results:  
color mode is RGB and thus color are off

Expected Results:  
color mode is CMYK, original colors are kept
Comment 1 Halla Rempt 2011-06-30 18:42:13 UTC
Hm... Tricky one... I'm not sure the poppler pdf library we use actually supports that.
Comment 2 Cyrille Berger 2011-07-01 08:47:41 UTC
poppler does, but the qt bindings does not. (but not using the binding is higly discouraged by the poppler developer).
Comment 3 Halla Rempt 2011-07-01 09:02:07 UTC
Hm... so we need to hack poppler-qt a bit. Could be interesting, since it communicates with QImage and doesn't seem to support icc profiles in any way that I can find.
Comment 4 Cyrille Berger 2011-07-01 12:14:26 UTC
I actually noticed that poppler return a pointer to a lcms profile, so that could be used to at least get the color "not off" when importing the pdf.


@Helge, what would be usefull is if you could attach a PDF with cmyk for testing ? (and maybe a screenshot of the expected colors for comparison).
Comment 5 Halla Rempt 2011-07-01 12:57:09 UTC
there is one attached already
Comment 6 Halla Rempt 2014-12-23 09:44:18 UTC
I'm sorry, but this really is an upstream issue: first poppler-qt will have to support it, so we need to report it there. When that's done, we can take a look.
Comment 7 David REVOY 2019-10-04 14:40:48 UTC
Just a note on this very old thread because I tested all of this deeply this week.

The CMYK PDF page opens as sRGB in Krita. But it looks like the CMYK was converted with a generic profile like ChemicalProof (not the ICC embeded in the PDF). This mistake also can be found in Okular. This is already cool.

If one wants to get the image as CMYK (not the page, sorry) you'll have to use pdfimages from the poppler-utils package:

$ mkdir extracted
$ pdfimages -all input.pdf extracted/output

It will extract tiff, jpg or ppm in CMYK; but not profiled. Then you'll still need to convert them  manually to the target ICC with Imagemagick (apply simply the profile; no convert/scaling):

$ convert output-000.tif -profile /path/to/your/CMYKprofile.icc output-profiled.tif

Then you can open in Krita and check the render of your PDF. That's what I do to control if Scribus exports well my picture in CMYK for my printer. I still can't tell if Scribus should profile the picture ; or if it is poppler that extract them and rmeove the profile... I'll write an article about this method and my experience of FLOSS printing workflow & validation.