[reportlab-users] ReportLab and "compositing" features

Dinu Gherman gherman at darwin.in-berlin.de
Thu Jul 12 23:43:36 EDT 2007


Jon Bradley:


> Now, the PDF generation part I feel will be tricky. I'd like to know

> if the following is possible:

>

> 1. A content area defined as a canvas (say, a business card size area)

> 2. This canvas area acts as a clipping area for it's content - so that

> I can load and place images outside of the boundaries (so they bleed

> in).

> 3. Duplicate multiple canvases so that I can fill a page up that will

> match an avery template.


No problem, I do that kind of thing very often for all sorts of things,
from simple address labels to CD/DVD labels/covers, etc. I can send you
samples on demand over private email in case you need any.

Bitmaps (including transparency in PNG) should be a no-brainer with PIL,
the Python Imaging Library. And if you need vector graphics you can find
pointers in this list's archive to svglib, a module I wrote, which
covers
the "essential" parts of SVG...


> I've seen a ton of examples, and can see how to create the PDFs with

> relative ease. The tricky part with this is that all the images (clip

> art - eps, jpg, or png) and the text fields are layered on top of one

> another (like a photoshop composite). On top of that, the fonts used

> will need to be pretty dynamic, though I've read that's as simple as

> modifying the fonts to work with reportlab.


As long as you have the fonts in Type1 or TrueType you can chose among
them at will based on any kind of data you provide to your PDF genera-
tor script.

Regards,

Dinu



More information about the reportlab-users mailing list