Bug 378769 - CMYK pdf import/pdf export
Summary: CMYK pdf import/pdf export
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-14 11:07 UTC by Alex
Modified: 2023-04-09 12:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2017-04-14 11:07:55 UTC
These could be nice additions when professional printing is involved.
1. Current pdf import is always RGB, but press pdfs are CMYK. Workaround by creating CMYK image and inserting pdf layer still uses CMYK->RGB->CMYK conversion
2. Exporting PDF in both CMYK and RGB to allow direct sending files to print office without any additional tools.
Comment 1 wolthera 2017-04-14 16:01:20 UTC
We actually removed PDF export because there's no good libraries to handle PDF cmyk support. We highly recommend using scribus to help with preparing for print.
Comment 2 Halla Rempt 2021-01-26 12:38:10 UTC
I think poppler supports CMYK output now, since 20.12.0
Comment 3 amyspark 2021-06-03 17:41:26 UTC
Poppler does, but we use the Qt5 backend, which forces rendering to QImage (and thus RGBA):

https://gitlab.freedesktop.org/poppler/poppler/-/blob/master/qt5/src/poppler-page.cc#L495

If we wanted it to work, we'd have to patch the backend and get the raw CMYKA blobs out.
Comment 4 wolthera 2021-06-03 19:00:04 UTC
Raw cmyk blob, or maybe just have each channel be rendered to a grayscale qimage.

The real question is of course, if we know how to get the cmyk out, how do we get it in? :)
Comment 5 amyspark 2021-06-03 20:23:42 UTC
If we have a single CMYKA blob from Poppler, we can writeBytes(...) the layer's paint device directly.

https://invent.kde.org/graphics/krita/-/blob/master/libs/image/kis_paint_device.cc#L1602-1614

But, we'd need to get the color profile, bit depth, etc... that's abstracted by Poppler-Qt5 and QImage.
Comment 6 amyspark 2023-04-09 12:08:14 UTC
Not working on this actively, but I did report the missing feature upstream. See https://gitlab.freedesktop.org/poppler/poppler/-/issues/1348