[reportlab-users] CMYK coloured <font> within a Paragraph ... And setting the default stroke colour

Stevens, Ian IStevens at globeandmail.com
Mon Feb 25 16:59:26 EST 2008


Thanks, Robin.

Is there a way to set the default stroke colour for the entire document?
The black is fine, but our printer is complaining that it's RGB black
and not CMYK black. Would setting the canvas stroke colour on a
template's beforeDocument(), beforePage() or beforeDrawPage() fix that
problem?

Thanks,
Ian.


> -----Original Message-----

> From: reportlab-users-bounces at reportlab.com

> [mailto:reportlab-users-bounces at reportlab.com] On Behalf Of

> Robin Becker

> Sent: Saturday, February 23, 2008 5:21 AM

> To: Support list for users of Reportlab software

> Subject: Re: [reportlab-users] CMYK coloured <font> within a Paragraph

>

> Stevens, Ian wrote:

> > I'm using the <font> tag to introduce a coloured symbol in

> a different

> > font within a paragraph. Is there a way that I can specify that

> > colour as CMYK? Currently the colour is RGB:

> >

> > eg.

> > colour = CMYKColor(0, 0.6, 0.94, 0)

> > style = ParagraphStyle('style', fontName='FontOne',

> textColor=black)

> > [...] p = Paragraph('Test para <font face="FontTwo" color="%s"

> > size="7"> &gt; </font> with colour' % (colour.hexval(), style)

> >

> > This is causing problems with our printer as everything

> else is CMYK,

> > including the same colour used elsewhere, and the symbol in the

> > paragraph is RGB.

> >

> > thanks,

> > Ian.

> >

> ......

> reportlab.lib.colors.toColor is used to parse the colour

> values so you can use

>

> <font color='CMYKColor(0,0.6,0.94,0)'>CMYKColor</font>

>

> etc etc

> --

> Robin Becker

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>



More information about the reportlab-users mailing list