I am generating pdfs with Perl and PDF::API2. How can I get my pdf to be CMYK? Currently my pdfs all come out as RGB according to ImageMagick’s identify command.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PDF::API2 allows colors to be entered as RGB or CMYK, and will output whatever you pass into it.
To enter a CMYK color, use the pattern
%CCMMYYKKinstead of#RRGGBB(note the percent sign instead of the number sign).For example, you can set “true black” as follows:
PDF::API2::Util also has an undocumented RGBtoCMYK function. I have no idea if it’s accurate, and it’s undocumented, so use at your own risk, but it might be useful as a one-time way to convert your existing RGB colors to CMYK.