Hi Team,
We are using the latest version (18.12.0.0) of Aspose.pdf and we tried to set font-size to 11 for HTML content. But in the generated Pdf the font size is 36 instead of 11. Can you please assist to resolve this? For your reference the sample code is below here.
We have tested the scenario in our environment and were able to notice the issue which you have mentioned. Furthermore, we have also tried specifying inline style for HTML string but font size was not still correct in the resultant PDF. Please check following code which we have tried in our environment and the screenshot of resultant PDF file.
HtmlFragment htmlFragment = new HtmlFragment("<p align='center' style='fontsize:11pt;'>123456789</p></n><p align='center' style='fontsize:11pt;'>ARON</p>");
Hence, we have created an issue as PDFNET-45838 in our issue tracking system for the sake of detailed investigation. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.
Yes, you can specify font size using TextState Class. However, the API is generating issue when font size is specified in HTML string. Nevertheless, we encourage that you have shared this suggestion. We will update here as soon as the issue is resolved.