A project report needs a header with the client name '[client=Greenfield Energy]' and a footer with page numbering 'Pa…
Open the PDF file you want to renumber in Adobe Acrobat Pro.
Press Ctrl+J (Windows) or Cmd+J (Mac) to open the JavaScript Console.
Best practiceYou can also access the JavaScript Console via the Tools > JavaScript > Debugger menu if enabled.
In the Console, enter a JavaScript script that uses the setPageLabels() method to define new page labels for your document.
RecommendationRefer to the Acrobat JavaScript API Reference for the correct syntax of setPageLabels().
Run the script by pressing Ctrl+Enter (Windows) or Cmd+Enter (Mac) in the Console.
Review the document to confirm that the page labels have been updated as intended.
Best practiceIf you need to apply complex labeling patterns (e.g., Roman numerals for front matter, Arabic for main content), structure your setPageLabels() array accordingly.
Save the PDF to preserve the new page labels.
You can use the JavaScript Console in Acrobat Pro to quickly apply custom page label schemes across large documents.
This runs in the Acrobat app - there is no separate API for this task.
You can send your PDF to the Adobe PDF Services API and use JavaScript code to set new page labels. This lets you automate numbering, so each page shows the label you want, like 1, 2, 3 or custom text.
A page label is the number or name shown for each page in a PDF file. It helps users find pages easily, especially when the document has sections that need different numbering styles.
Yes, you can use JavaScript to assign different label styles to different page ranges, such as Roman numerals for the intro and numbers for the main content, by specifying the format for each section in your code.
Renumbering with code is much faster and more consistent, especially for large or multiple PDFs. Manual editing is slower and can lead to mistakes if you have many pages or complex formats.
Automating page labels lets you match document standards, make navigation easier, and handle special cases like appendices or combined files, which is hard to do with default numbering.