Pregunta

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

¿Fue útil?

Solución

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>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top