"Real" page numbers

Is there any way to have the web viewer display custom page numbers?

For instance, I have a document with a cover page and 9 pages of roman numerals, then regular numbers.

So “Page 1” is actually the 11th page. When we communicate to customers to “go to page 32” in other literature and marketing, they go to pdftron and go to page 32 via the paging control, which is actually page 42 of our pdf.

We can’t exactly change all of our documentation, marketing, and communication with customers to account for pdftron numbering everything sequentially. Is there a way to have custom numbering, so perhaps we could make the numbering be more accurate to the way the pdf is actually numbered?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Would you be able to share your PDF file with that kind of numbering?

1 Like

I cannot, it’s a paid for product.

But regardless of the PDF, I’m looking for a way to make the page numbers in pdftron either read the page number from the page (even if it’s a roman numeral) or be completely custom so that I can manually put in that page 1 should be “cover” and page 2 should be “I” page three “II” etc…

Hello, still waiting for some advice on this one. We really need a way to do this.

Hi, jdemers,

I apologize for the delay, I investigated this feature in our code and it looks like there is an API that may helpful to you! The API for setting page labels like in this API PDFTron WebViewer Namespace: UI

  .then(function(instance) {
    var docViewer = instance.Core.documentViewer;

    // you must have a document loaded when calling this api
    docViewer.addEventListener('documentLoaded', function() {
      instance.UI.setPageLabels(['i', 'ii', 'iii', '4', '5']); // assume a document has 5 pages

You will also need to use fullAPI: true mode for this feature.

Also, alternative If you would like you can use our UI here GitHub - PDFTron/webviewer-ui: WebViewer UI built in React and you can fork it and change it the way you like.
You should be able to utilize PDFTron’s APIs to read a text and other APIs to get page information.