[reportlab-users] ValueError

Robin Becker robin at reportlab.com
Tue May 7 04:40:27 EDT 2024


Hi,

I think you will get better advice if you post your ReportLab issues on the users list which you can join at

https://pairlist2.pair.net/mailman/listinfo/reportlab-users

I looked at the message you sent showing the text that causes your error.

text = "<para><p><span style='font-family: Arial; background-color: #ffffff;'>Sample Content</span></p></para>"

We do not have a full css parsers and the reportlab paragraph language is not any form of html. True it is XML, but 
still not xml.

The style attribute of <span> tags is not the same as the style attribute of html. We do not and never have had the 
ability to create styles from a css like attribute. The style attribute is not implemented.

We do allow the <span> tag to have some attributes eg fontName, fontSize, textColor or backColor.

So far as I know the later python3 only versions of ReportLab have similar capability to the older python2/3 versions.

We have moved to python3 only because python2 support is now dead and should not be used.
-- 
Robin Becker


More information about the reportlab-users mailing list