Controlling Page Numbers and Forcing Odd/Even Page Starts in NetSuite PDFs

In NetSuite’s Advanced PDF templates, you can control the starting page number and ensure that certain pages begin on either an odd or even page.

1. Default Page Numbering

  • By default, the first page of a PDF is numbered 1.
  • You can override this default using the pagenumber attribute in the <body> tag.

Example:

<body pagenumber="5">

This will start the document numbering from page 5.

2. Setting Page Numbers with <pbr> Tag

  • The <pbr> (page break) tag can also be used to control page numbering.
  • When pagenumber is set in the <pbr> tag, it defines the number of the new page that starts after the break.
  • If pagenumber is not specified, the new page will automatically be assigned the current page number plus one.

Example:

<pbr pagenumber="10" />
<!-- The new page after the break starts at page number 10 -->

Leave a comment

Your email address will not be published. Required fields are marked *