[reportlab-users] CMYK in platypus.Table
Andy Robinson
andy at reportlab.com
Tue Dec 23 05:27:45 EST 2008
2008/12/22 Andrea Cappelli <a.cappelli at gmail.com>:
> Hi all,
> I'am using report lab to produce pdf which will be printed in a
> tipography, which requires CMYK colors for everything.
> For text and images i'am able to specify such colors, but if I want to
> use a Table or Paragraph with platypus i see in the doc the colors have
> to be specified as RGB. Is possible to have CMYK colors in
> Tables/Paragraphs? Someone as the same problem/requirement?
>
You can use CMYK everywhere. However, the standard color names
such as "black", "red" etc refer to RGB colors, and several things
default to RGB black (such as grid line colour and paragraph text colour).
To produce a CMYK document, you'll therefore need to explicitly
create a "CMYK black", and set the colour of your paragraph text
to it in the stylesheet. If you are using getSampleStyleSheet(),
paste the source into a new module of your own and set the colours.
We have found in the past that printing presses are usually smart
enough to treat RGB black as CMYK black - YMMV here - but any other colour
needs to be specified.
We probably ought to have a variable you can set at the outset which
asks if the document is CMYK or RGB and warns if you mix them, but
at this time we don't.
- Andy
More information about the reportlab-users
mailing list