[reportlab-users] SplitImage flowable

Dinu Gherman gherman at darwin.in-berlin.de
Mon Apr 1 10:03:41 EDT 2013


Hi,

I've written a SplitImage flowable, that should be able to wrap and
split "long" images as they seem to become increasingly popular on the
net in Platypus documents. It only splits vertically without squeezing
the image horizontally into an available frame, which would be rather
easy to do in a preprocessing step.

So far, I haven't tested it very much, but wrapping/splitting in the
attached code sample seems to work. There are some shortcomings, though,
to which I'd like to solicit comments from the knowledgable people on
this list.

One issue is that the code generates temporary files on the disk which
I'd like to avoid, but the Image flowable seems to make that hard, or
maybe I haven't done it as expected, yet. And the second is, that the
code for the splitting is slightly obscur, and I wonder if there is a
better way of accessing the flowable's internal image instead of making
a new one for it?

Thanks,

Dinu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: splitimage.py
Type: text/x-python-script
Size: 2645 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20130401/2efb07ce/attachment.bin>


More information about the reportlab-users mailing list