Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Printable rotation in IE8

How do I print rotated content (divs) in IE8? The DXImageTranform filter options do not appear to be printable.

http://msdn.microsoft.com/en-us/library/ms533014(v=vs.85)


Just to put this into context. I'm writing a pure dom-based canvas library called simpleCanvas. I am desperately trying to offer rotation of text, rectangles and images in IE8 without using a VML fallback, because it's ugly and slow, and error prone. A VML fallback is on my todo list as I concede that it's the only way I know how to do this in IE8 without additional tools. I'm hoping that there is some trick that I'm missing that doesn't come with a third party or server side requirement. If you have found it, a bounty is coming your way.

like image 348
Matt Esch Avatar asked Aug 27 '12 04:08

Matt Esch


1 Answers

This is a massive stretch but is the best idea I could come up with:

Explorer Canvas - https://code.google.com/p/explorercanvas/ - Implements the canvas in IE8 by abusing VML.

HTML2Canvas - http://html2canvas.hertzen.com/ - Can render your document onto a canvas, which can then be rotated.

Failing that, I suspect your only option is going to be to generate a rotated document server-side and give that to the client for printing.

Edit: One other last ditch would be to handle the printing via Silverlight, embedding the page in a browsercontrol inside silverlight (yuck), rotating that and printing the result via SL.

Really grasping at straws here though for anything client side in a legacy browser.

like image 127
PhonicUK Avatar answered Sep 24 '22 13:09

PhonicUK