[reportlab-users] Drawing an image in the background of a frame

Lele Gaifax lele at metapensiero.it
Thu Sep 26 06:51:04 EDT 2019


Hi all,

I'm asked if it would be possible to obtain something like the following
sketch, where I have a frame with a "background" image and, in a specified
area (a "subframe"), a superimposed list of flowables (paragraphs of text)
with a "white" background:

    +--------------------------------+
    |iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii|
    |iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii|
    |iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii|
    |iiiiiiiiiiiiiiiiiiii+-----------+
    |iiiiiiiiiiiiiiiiiiii|           |
    |iiiiiiiiiiiiiiiiiiii| fffffffff |
    |iiiiiiiiiiiiiiiiiiii| fffffffff |
    |iiiiiiiiiiiiiiiiiiii| fffff     |
    |iiiiiiiiiiiiiiiiiiii|           |
    +--------------------+-----------+

The problem is that I should omit the image *iff* the flowables do not fit in
the given area, possibly "trying" further combinations of image+flowables
until one fits, so I cannot simply draw the image and then do a
"subframe.add(flowable)".

What approach(es) would you suggest, if any?

Thanks in advance for any hint,
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele at metapensiero.it  |                 -- Fortunato Depero, 1929.



More information about the reportlab-users mailing list