问题
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:
- The WebBrowser class object. While rendering html as an image, it uses the screen resolution on the server machine.
- The Sciter by Terra Informatica. It does not exposes a property with which one can set the resolution of the output image
- 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