Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2013-07-26 16:13:07

New member
Registered: 2013-07-26
Posts: 1

set image sizes in style="width:..px;height:" instead of in attributes


In my web application, inputs through xinha are processed with weasyprint in order to build some PDF.

However, weasyprint uses inline styles (or CSS)  instead of (other) HTML attributes, to format its output.
Presently, weasyprint renders inserted images according to their real sizes, because
width=".." and height=".." set by xinha are ignored.
When i set by hand style="width:..px;height:..px" through xinha in HTML mode, it is preserved
and weasyprint uses them as expected :-)

However, I am trying to by-pass this manual processing by modifying xinha. I have spent 2-3 hours in
order to find out where in the code the attributes are set. Without success. This is why i am posting here.

The code for 2 operations is involved: 1) when inserting an image 2) when resizing it.
Indeed, resizing erases the style attribute and reset the width and height ones

Any hint would help a lot.
Many thanks


Board footer

Powered by FluxBB