Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

In the Custom PDF how can we break the page and create a new page for one section.

priyanka68
Tera Contributor

Hi,

In the custom pdf one sections should be displayed in a new page. i have used <div class="pageBreak"></div> but this syntax is not working. Can someone help me on this.

Thanks,

Priyanka

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hello Priyanka,

 

Use PageBreak in your CSS:-

.pageBreak { page-break-after : always; }
.pageBreakBefore { page-break-before : always; }

 

Then add this to the body where you want the newpage:-

<div class="pageBreak">

 

Thank you!

View solution in original post

1 REPLY 1

Community Alums
Not applicable

Hello Priyanka,

 

Use PageBreak in your CSS:-

.pageBreak { page-break-after : always; }
.pageBreakBefore { page-break-before : always; }

 

Then add this to the body where you want the newpage:-

<div class="pageBreak">

 

Thank you!