- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 12:39 PM
Hello,
I am making an HTML Document Template to create a dynamic PDF. I am using primarily tables, and then filling those tables with variable values. However sometimes if the table falls on a page break, it splits the table into 2 different pages. Is there anyway to set it so a table that falls on a page break automatically moves into the next page, so the table isn't split?
Thanks!
Solved! Go to Solution.
- 2,529 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 06:25 AM
Hey
I found an easier solution - this can be resolved using HTML rather than ServiceNow functionality.
Within the HTML script that you're producing, in your <table> tag, add "page-break-inside: avoid" to the style attribute.
Example:
<table style="page-break-inside: avoid"> your content </table>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 01:18 PM
Hi
Follow this article as this has worked perfectly fine for me. Generating a PDF from HTML.
If the problem still persists. Please share your code.
Hope this helps you.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 06:25 AM
Hey
I found an easier solution - this can be resolved using HTML rather than ServiceNow functionality.
Within the HTML script that you're producing, in your <table> tag, add "page-break-inside: avoid" to the style attribute.
Example:
<table style="page-break-inside: avoid"> your content </table>