New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMYK option does not apply to QR codes #460
Comments
Upon checking the PR, it became clear that only the text, line, rectangle, and ellipse schemas support CMYK. To add CMYK support for QR codes as well, modifications to the barcode schema will be necessary. Ref: #436 |
Whilst CMYK colours can be passed to bwip-js, apparently it converts to RGB anyway internally. This might be difficult to achieve... |
@peteward Thank you for investigating umm... |
The first step would probably be to do the conversion to CMYK for barcode color values as input for bwip to confirm if this does or does not work, then decide if post-conversion of images is something we can or should do |
@nicorsm |
Hi @hand-dot, right now I'm not that familiar with the codebase of this library and with React, so I believe it's better to assign the task to someone else. I'll try anyway to look into this issue in the upcoming weeks as I want to understand better how the library works. |
Describe the bug
TL;DR: when rendering documents as CMYK with the
colorType: cmyk
option, the QR codes inside them are rendered as RGB.I'm trying to export a series of QR codes by using a template containing placeholders for a QR code, which has been created with the Template Designer at pdfme.com starting from a CMYK file. I'm also setting the
colorType
option tocmyk
.Everything looks good, however, when opening the output PDF file in Illustrator, a popup opens saying that the document has mixed RGB and CMYK content.
I dag deeper by opening the document in Acrobat Pro and running the printing Preflight tool, and I found that, while the whole content is correctly rendered as CMYK, the QR code is rendered as RGB.
To Reproduce
Sample code can be found here, together with a sample
output.pdf
file and the JSON of the template: https://github.com/nicorsm/pdfme-cmyk-issueAfter installing the dependencies, you can run
node index.js
.Expected behavior
I would expect the QR code to be rendered as CMYK, same as the whole document.
Your Environment
Your Error Log
Additional context
This issue has to do with the introduction of
colorType
option described here: #436The text was updated successfully, but these errors were encountered: