Question

I’m using Flying Saucer/iText to generate report. Now the report has a condition that if a specific condition takes place the report should move to next page of pdf and add the data on PDF and so on.
Regards Pawan

Was it helpful?

Solution

You have to specify the page break in the HTML you pass to ITextRenderer by using the css property page-break-before.

For example:

<style type="text/css" >
    #page2{page-break-before:always}
</style>

<p id="page1">Content of first page </p>
<p id="page2">Content of second page </p>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top