Re: Strange problem with an inline image in a Paragraph
Robin Becker <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
On 25/06/2020 16:48, Lele Gaifax wrote: > Hi all, > > I have a problem with adding an inline image in a Paragraph(), using raw > Frame(). My application builds a PDF document using a sequence of > "rectangles", where each rectangle gets drawn by a particular function. > > A few days ago I started seeing something completely unexpected and > inexplicable: I have tree such rectangles in a row, each containing a single > image and some text, and one of them comes out with a double image! > > Here is an extremely cut down self-contained example script that exhibits the > problem: .......... > > Am I missing something, or doing something wrong? > > Thanks in advance for any hint, > ciao, lele. > In the absence of the strange image I used the pythonpowered image from the reportlab tests folder. I find I am seeing the 'ghost' image with the original sizes. However, if I change the width/height for both then I see two images only for smaller images. I suspect there is some kind of attempt to wrap split etc etc. Can you say what version you are using and have you changed recently. I find thet I am seeing problems when the image height is too large. If you remember that the standard frame has padding of 6 then the maximum height will be 1cm - 12 ie about 16 so we are probably seeing the effect of some kind of overflow. I don't normally try to use paragraphs like this with frames. I will try and take a look deeper to see exactly what causes the replicant. -- Robin Becker