|
Rank: Member Groups: Member
Joined: 1/22/2014 Posts: 20
|
You really should consider adding support for an HtmlToPdf option that allows us to tell the converter to use the "print" media. This would allow us to write scalable and web standards compliant apps.
<link media="print"...> for those of us who will use it please!!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Thank you very much for your feedback. As you already know, the current version does not use print media. The reason is for most users, they are looking for an output that looks exactly as it looks on screen. However we do understand some users wish to be able to use the print media styles. So we will definitely look into it and see if it is possible for us to support it.
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 40
|
+1 for "print" media support...
@Droddy - As a workaround you may be able to append some JavaScript to the end of your file (which you trigger via window.onload) to force apply/load whatever you need to do to for print media. I'm currently doing this to replace the inline CSS Style block (which has a print media section) with a manually merged CSS style. This works for me because I have a known fixed style block for all of our files so this may not work for you - or may require more complex scripting (i.e. YMMV). It also obviously has some limitations such as @page not being supported still (so can't set page level margins that use the CSS collapsing margin model). You can tack on the JavaScript either by reading the file into a string and calling ConvertHtml() instead of ConvertUrl() or possibly setting a static footer on the website (which wasn't applicable in our case but I tested).
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
@CWoods - Thanks for sharing!
|
|