gpt4 book ai didi

html - 使用 iText 将 HTML 转换为 PDF

转载 作者:技术小花猫 更新时间:2023-10-29 11:37:41 24 4
gpt4 key购买 nike

有谁知道是否可以使用 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-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.

关于html - 使用 iText 将 HTML 转换为 PDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/235851/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com