We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Conversion from HTML to PDF does not apply css styles


I’m trying to convert a html page to pdf using Aspose.Pdf but the generated pdf file does not apply any of the included stylesheets. I have tried with the CustomLoaderOfExternalResource too, but it does not make any difference. Are there restrictions related to css, as in only some types of rules are supported?

Please find the attached files and images of the input html file and generated pdf.
input.PNG (19.7 KB)
output.PNG (26.1 KB)

source.zip (226.9 KB)


Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. It appears to be a file specific issue as there is no limitation for any specific CSS rule. A ticket with ID PDFNET-44476 has been logged in our issue management system for further investigation and resolution. The issue ID has been linked with this thread so that you will receive notification as soon as the issue is resolved.

We are sorry for the inconvenience.

Is there any update on this issue ?


This issue was fixed in the past. If you are facing it then create a new topic with your source files and code so that we may try to reproduce the same on our end.