开发者

What is the process of turning HTML into Postscript programmatically

I am trying to understand what the process is of turning HTML into a PDF/Postscript programmatically

All Google searches turn up libraries to do this, but I am more interested in the actual process required.

I know you could just set up a Postscript printer 开发者_如何学运维and print directly to that, but some of these libraries appear to create the PDF on the fly to allow previews etc.

has anyone had any experience in this, or can provide any guidance?


Yes! Try this: http://code.google.com/p/wkhtmltopdf/ . If you are interested in writing one, read it's code. It's dead simple to render to PDF/PS/PNG/JPEG.

Read these: http://doc.qt.nokia.com/4.6/qwebframe.html#render & http://doc.qt.nokia.com/4.6/qpainter.html

I've used qwebframe & qpainter in my HTML to PDF/PNG/JPEG program. It works like a charm! Stick with wkhtmltopdf if you are lazy to code.


I ended up using iTextSharp for this, which worked extremely well

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜