Converting HTML with page number

I’m converting a long html page to doc file.

Since the html page is quite long, the doc file has multiple pages.

With this, I just wonder if it’s possible to put a page number on each page of the doc file.


Hi Changro,

Thanks for your inquiry. Please move the cursor to the header of document and insert the page number field as shown in following code example. Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document(MyDir + "in.htm");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.write("Page Number : ");
builder.insertField(FieldType.FIELD_PAGE, true); + "Out.docx");