[reportlab-users] SplitImage flowable

Dinu Gherman gherman at darwin.in-berlin.de
Thu Apr 11 10:09:03 EDT 2013


I wrote:


> 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?


For those who are interested, the solution without temporary files is
attached to this posting... (and it also looks less obscure).

Regards,

Dinu

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


More information about the reportlab-users mailing list