Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set new page in HTML using iTextSharp HTMLWorker (html to pdf)

I using iTextSharp (V 5.4.2.0) to convert a html page to pdf. But I would like to be able to set a new page.

I've tried this:

<div style="page-break-before:always">&nbsp;</div>

and the tag <newpage />

But it doesn't work. What is the best way, to create a html page, including new page tags (or something) to be able to convert it correctly using iTextSharp?

Kind regards,

Matthijs

like image 837
user369122 Avatar asked Jun 11 '13 11:06

user369122


1 Answers

A <np /> tag in your HTML inserts a page break in the Document/PDF.

like image 115
Stefan Avatar answered Oct 06 '22 00:10

Stefan