问题
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