Prevent page break in text block with iText, XMLWorker

╄→尐↘猪︶ㄣ 提交于 2019-12-11 03:48:51

问题


I have a text block in a <div> or <p> which I want not to have a page break within. If the text block does not fit on the current page then I want it on a new page. How can I setup XMLWorker to prevent page breaks within certain tags?


回答1:


As of version 5.5.7 the XMLWorker in iText supports page-break-inside: avoid; See Changelog



来源:https://stackoverflow.com/questions/29601081/prevent-page-break-in-text-block-with-itext-xmlworker

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