I am converting a Html document to PDF and the text colors and background colors within are being stripped out. To me it seems like Aspose.PDF is getting a “Print” ready version of the document in place.
This occurs with css class defined background colors as well as inline background colours.
e.g.
<div style="background-color: red">This text should have a red background</div>
We would like to request you to share the source files including all necessary resources, CSS, Images, etc., if any, along with the generated PDF document and the source code you are using for this conversion so that we may try to reproduce and investigate it in our environment. Kindly ZIP all relevant files and share with us.
Hi Farhan, on creating a demo project for you I can see that the background colours are being set as expected. This makes me wonder if I have a media -> print style definition interfering with things in my main project.
I’m happy to admit that this is my issue and not one with Aspose!
Just to update, it was the Bootstrap 3 @media print queries that were (correctly) stopping the backgrounds and colours from being visible. I’m now referencing a modified Bootstrap.css file with the @media print style definitions removed and all is well!