Re: ValueError
Robin Becker <[email protected]> Tue, 7 May 2024 09:40:27 +0100
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
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