Printing a html file to PDF loses HTML formatting I have this standalone report in html. CSS styles are all embedded within the html itself.



When I tried to print to a pdf file, the pdf output becomes



I basically lost all the formatting in the html. Both chrome or safari produce the same result.

How can I get a PDF that preserves the format?
The default setting for printing webpages is to try not printing extra images and colors to waste ink etc. Theres an option to print everything, see image below:

Let us know if this worked for you.