[reportlab-users] grayscale documents

Robin Becker robin at reportlab.com
Fri Mar 14 06:37:33 EDT 2008


Jerome Alet wrote:

> Hi there,

>

> I'm using RL to generate dynamic banner pages in my PyKota (www.pykota.com)

> print accounting software.

>

> These banner pages are currently in color, but I'd like to offer

> an option to force grayscale mode.

>

> I'm currently using "canv.setFillColorRGB(r, g, b)" calls.

>

> Should I first convert (r, g, b) to grayscale using

> colors.color2bw((r, g, b)) before calling canv.setFillColorRGB() or

> is there some special construct which would force the whole document

> to be in grayscale mode when rendered ?

>

> Thanks in advance

>

.......

We don't have anything in place to do this right now. There are a lot of places
where color is set. The lower level stuff is I think all in class
_PDFColorSetter. It might be worthwhile hacking that to try and see if you can
do all your colors.color2bw stuff there.
--
Robin Becker


More information about the reportlab-users mailing list