Convert Html to a Printable Image

帅比萌擦擦* 提交于 2019-12-13 04:28:03

问题


I am working on a project which runs on .NET 2.0. My task is to recreate the data displayed in HTML as a prinatable image (with the resolution of at least 150dpi). I looked into several options, to no avail:

  1. The WebBrowser class object. While rendering html as an image, it uses the screen resolution on the server machine.
  2. The Sciter by Terra Informatica. It does not exposes a property with which one can set the resolution of the output image
  3. Awesomium can be used with .NET 4.0 or higher only.

I wonder if there is a .NET library out there that can convert an Html page to a printable image. Any help is much appreciated.


回答1:


The usual way to do this is to generate the page as a PDF server-side an allow the user to download and print the PDF.



来源:https://stackoverflow.com/questions/14610631/convert-html-to-a-printable-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!