使用iText将HTML转换为PDF [英] Using iText to convert HTML to PDF
问题描述
有谁知道是否可以使用iText将HTML页面(url)转换为PDF?
如果答案是否定的,因为我会停止浪费我的时间去尝试解决问题,并且花费一些钱在我知道的许多组件之一上:)
在此先感谢您的回应!
我想这正是您要找的东西
http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html
http://code.google.com/p/flying-飞碟
飞碟的主要目的是将符合规范的XHTML和CSS 2.1作为Swing组件呈现在屏幕上。虽然它最初是为了将标记嵌入到桌面应用程序(比如iTunes音乐商店)中,但飞碟已经扩展了iText的工作。这使得XHTML很容易呈现为PDF,以及图像和屏幕。 Flying Saucer需要Java 1.4或更高版本。
Does anyone know if it is possible to convert a HTML page (url) to a PDF using iText?
If the answer is 'no' than that is OK as well since I will stop wasting my time trying to work it out and just spend some money on one of a number of components which I know can :)
Thanks in advance for your responses!
I think this is exactly what you were looking for
http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html
http://code.google.com/p/flying-saucer
Flying Saucer's primary purpose is to render spec-compliant XHTML and CSS 2.1 to the screen as a Swing component. Though it was originally intended for embedding markup into desktop applications (things like the iTunes Music Store), Flying Saucer has been extended work with iText as well. This makes it very easy to render XHTML to PDFs, as well as to images and to the screen. Flying Saucer requires Java 1.4 or higher.
这篇关于使用iText将HTML转换为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!