[reportlab-users] Center align emoji's png images inside Paragraph

Kaviraj Kanagaraj kaviraj at launchyard.com
Wed Jul 15 11:50:23 EDT 2015


Yea you are right thats the problem. But If you look closely except the
first page none of them are center aligned correctly. Paragraph seems to be
moving left as you increase the number of images. The problem may not only
be in break lines code may also be in the way reportlab interpreting
images. I mean even a single line paragraph is not properly center aligned
if it contains images..

Thanks for looking into my problem.

On Wed, Jul 15, 2015 at 9:06 PM, Robin Becker <robin at reportlab.com> wrote:

> On 15/07/2015 14:12, Kaviraj Kanagaraj wrote:
>
>> Hi Robin,
>>
>> Thanks a lot for time. I have checked out your code. Here I attach the
>> customized code about my exact scenario. I have attached the output pdf
>> also. I have included both the "working paragraph" and "problematic
>> paragraph" examples.
>>
>> Help me figuring out what is wrong. Thanks a lot again
>>
>> P.S: I dont know how to replay to your mail in reportlab group itself.
>>
>>  your email seemed to reach the reportlab-users at reprotlab.com group fine.
>
> I'm not sure exactly what the problem is.  There are 4 pages with centred
> paragraphs drawn on them. Which is problematic and why?
>
> I can only imagine that the last page which shows the text + images not
> centred horizontally is the problem. I think that's because the last 'word'
> which consists of nothing, but images is getting wrapped and the remnant
> first line doesn't get centred properly. If that is your problem then I
> think this is a bug in the break lines code. It seems we are assuming each
> img is a word and must be followed by a space.
>
> I'll see if there's an obvious fix.
> --
> Robin Becker
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20150715/32f923b6/attachment.html>


More information about the reportlab-users mailing list