HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Support for page-break-after:avoid
- This topic has 5 replies, 2 voices, and was last updated Aug 07, 2015
07:26:00 byAnonymous.
-
AuthorPosts
-
August 6, 2015 at 06:39#27038
Hello.
The page-break-after CSS tag is listed as partially supported and “in development”. We would really appreciate support for the “avoid” value so that we could prevent the document author’s signature to spill over to the next page alone. (Our customer would prefer to pull a line or two of the last paragraph to the next page as well.)
How is this functionality progressing and when could we expect it in PD4ML?
With best regards,
Matija PolajnarAugust 6, 2015 at 06:42#29809For the case PD4ML supports “page-break-inside: avoid”, applicable to block elements (
, etc).August 6, 2015 at 08:26#29810The problem is that the document above the signature is written by the user of the application. I have no control over its content; the last element could be a single-sentence paragraph, a long paragraph, a table, an image … Your solution would only be useful if I would encapsulate the last element of the document and the signature image within a single div and style it with page-break-inside:avoid. But I cannot do that because that would also prevent page breaks within the last, possibly long, paragraph of the document.
August 6, 2015 at 10:53#29811With the current architecture (v39x) the feature is not supported and it is quite untrivial to implement.
We plan to include the feature support to a totally refactored forthcoming v40x, but its release will happen not sooner as in 2-3 months.
August 6, 2015 at 12:30#29812Well, we have a bit more than 2 months of upgrades covered by our current Pro licence, but no pressure. 😉 Thank you for your answer.
August 7, 2015 at 07:26#29813Now we’re trying to workaround this issue (temporarily) by allowing the signature to fall outside of the regular printable area (possibly reaching into the document footer). But PD4ml does not seem to allow that: even if we put the image in a smaller div with overflow:hidden, thus effectively cropping the bottom of the signature image (which is usually blank anyway), as soon as a part (albeit cropped) of the image would reach outside of the printable area, it disappears entirely. (A simple test for this behaviour is positioning the image with style=”position:absolute; bottom: -1cm;”.)
While browsers (tested with Chrome and Firefox) have problems with page-break-after:avoid as well, they at least handle this situation correctly. Could you comment on that?
Best,
Matija Polajnar -
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
