gpt4 book ai didi

pdf-generation - IText 2 + Flying Saucer : how to avoid that the images appears broken between two pdf's pages?

转载 作者:行者123 更新时间:2023-12-02 17:49:55 25 4
gpt4 key购买 nike

我有一个 html 文件,我正在使用带 Flying Saucer 的 Itext 2 将其转换为 pdf 文件。

问题是,如果图像在页面末尾附近开始, Flying Saucer 会在当前页面的末尾渲染它的一部分,而在下一页的开头渲染其余部分。

如何说我只想在一页上显示整个图像?

最佳答案

您可以将其添加到您的打印 css 中:

img {
page-break-inside: avoid;
}

user guide (PDF)提到它。

关于pdf-generation - IText 2 + Flying Saucer : how to avoid that the images appears broken between two pdf's pages?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9499519/

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