Is there a way to switch an HTML page to "print" mode?
When I print, a @media print
style-sheet gets applied to the page.
I want to use the page with that print style applied to export to PDF as well. Ideally, if I could get the HTML that gets sent to the printer when I use window.print()
I could export it to PDF. I use a server side library and C# to export to PDF.
Any ideas on how I can do this?
Thank you!