[reportlab-users] ReportLab and "compositing" features

Jon Bradley shiftedpixels at gmail.com
Fri Jul 13 07:43:37 EDT 2007


Dinu,

Thanks a ton for the response. Still trying to wrap my head around
this stuff.

The PIL stuff should be relatively easy, but I'd really like to avoid
it. I think I have a grasp now that the canvas is the page
(basically) and I can place things wherever I want - and they are
layered in the order they are added to the canvas (not sure about
swapping things around?).

The biggest part that I'm having questions about are that of clipping
paths. Using PIL would be fine and dandy - but in this, the PNG
graphic may lie on top of text or other elements inside the PDF file.
So, using PIL would really not do me any good unless I wanted to crop
something, which I don't. I'd rather let a clipping path take care of
all the content, so the PDF could be edited later down the road in
Illustrator.

SVG sound like it could be pretty useful - EPS graphics are what
we've got right now (and they are working ok in FPDF).

As far as the fonts...good to know. I'd love to use whatever I can
from our library.

thanks!!

Jon


On Jul 12, 2007, at 11:43 PM, Dinu Gherman wrote:

> 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

>

> _______________________________________________

> 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