Reputation: 5064
I have a printable version of a page using window.print()
. How do I get the HTML of it (print version) without opening the printer dialog? This is because I want to get the HTML code of it and pass it as a post request
Upvotes: 0
Views: 264
Reputation: 1039
As far as I know it's only the stylesheet that is changed, not the HTML. Browsers come with default styles for displays and for print. You can customize the print view using media queries in your CSS. That is how a lot of sites for example strip color or underlines from links in the print view.
Upvotes: 1