C# PDF Printing Library [closed]

为君一笑 提交于 2019-12-12 09:28:17

问题


Are there any free libraries that would "print" to a PDF without actually having to install a PDF printer on the system. I want something that can be completely self contained in my application. The reason I say I want it to "print" is that I've tried and tried to find a solution for directly converting from HTML with CSS to PDF, but it does't seem very possible. So I want to use the System.Windows.Forms.WebBrowser control to render the page first and then output that rendering to PDF. I just don't want the user to be required to install a PDFPrinter.


回答1:


PDFsharp




回答2:


Does it have to be free? Last time I looked at ABCpdf it looked quite good, and claims to support css (here).

HTMLDOC should support css at some point, but last time I checked the css stuff was still in beta. And has been for "some time"; I've given up waiting... It isn't .NET, but you can use Process to invoke it.




回答3:


http://www.html-to-pdf.net/ - This isn't free but its preety cheap and effective. I am using it now to convert HTML with CSS to PDF. Essentially we display the page to the user and then with a click of a button they can download a PDF of the page.




回答4:


http://itextsharp.sourceforge.net/ is really excellent. You can see how to use it in the repository at stochfit.sourceforge.net




回答5:


Another tool (not free): http://www.winnovative-software.com/



来源:https://stackoverflow.com/questions/430941/c-sharp-pdf-printing-library

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