Inline SVG Content not displaying in IE Screenshot

前端 未结 2 1318
囚心锁ツ
囚心锁ツ 2020-12-15 11:00

I\'m working on a thumbnailer whereby a service takes thumbnail images of HTML content in a form-less IE9 control. Everything is working smoothly with a DrawToBitmap call al

2条回答
  •  借酒劲吻你
    2020-12-15 11:55

    The answer came from Ted Johnson of IEBlog:

    IE9 has no separate SVG engine; it’s all one DOM and rendering pipeline. However, if your document isn’t in 9 standards document mode, you’ll not get any SVG content. I think, by default, the WebBrowser control in .NET defaults to compatibility mode. Try adding a meta tag to the top of your HTML page to force IE9 mode:

    
    

    This, indeed, turned on SVG rendering like a light switch.

提交回复
热议问题