HTML to PDF conversion > font size not applied

Hi there,

We are using the Aspose.Pdf for .NET version 19.8 to convert HTML to PDF and we understand that there are some limitations to that. However, we run into some issues that we would like to share with you as they make no sense.

One of them is that font size is no being applied at the span level in a very narrow scenario where there is a font-size is set globally in * through a css that the html is referencing (see output.pdf in the attached HtmlToPdf.zip (204.2 KB) - this contains the project and input HTML).
The font size is being applied if the span containing directly the text and not when the text is wrapped in another tag (strong and ins in this case).

If we remove that default font-size in the span then the conversion works but then we lose the capability to set a default font size (see output1.pdf in the attached archive).

As stated, we need to understand if this is just a limitation or a bug. At any rate, we need a workaround to get pass this.

Thank you!

@gwert

Thank you for contacting support.

We have worked with the data shared by you and have been able to notice the difference. However, we are afraid this may not be a bug as Google Chrome displays it exactly the same way when respective HTML files are opened.

If you still have any concerns then please feel free to contact us.

Hi,

We already have the workaround of having the default styling under the html selector instead of *.
But to your point, both Chrome and Firefox render it the same so we will go for now with the html selector and get back here if we see any issues.

Thank you!

@gwert

Thank you for your kind feedback.

Please feel free to contact us and we will be more than happy to assist you.