Welcome Guest Search | Active Topics | Sign In | Register

media=print Options
Droddy
Posted: Tuesday, March 4, 2014 2:45:42 PM
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!!
eo_support
Posted: Tuesday, March 4, 2014 4:33:54 PM
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.
CWoods
Posted: Monday, July 28, 2014 4:47:06 PM
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).
eo_support
Posted: Tuesday, July 29, 2014 9:30:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
@CWoods - Thanks for sharing!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.