0

I want to renumber the pages in the navigation pane of Adobe Acrobat X using a script. There are only a limited number of numbering styles available in the page numbering options, as follows:

1, 2, 3,...
i, ii, iii,...
I, II, III,...
a, b, c,...
A, B, C,...

See image for how the option window looks.

[not enough reputation to post images]

However, I want to have "n, n-1, n-2, n-3,..." where n is the total number of pages or a custom number.

So, for example, if my document is 100 pages and the pages are currently numbered 1, 2, 3, 4...98, 99, 100 I want to be able to renumber them as 1, 2, 3, 100, 99, 98...6, 5, 4. This is to accommodate for languages with different reading directions (LTR and RTL) in the same document.

Other than manually correcting the page numbers in the navigation pane, is there a way to do want I want using a script in the JavaScript Debugger Console?

Ad Astm
  • 123
  • 4

1 Answers1

0

You won't be able to change the page label in the way you describe. Acrobat JavaScript will let you set the numbers programmatically but it will always try to append a sequential number to the end a prefix string.

A page "label" which is what shows up in some PDF viewers rather than the sequential page number is the numbering scheme for the specified page and all pages following it until the next page with an attached label is encountered. A page label consists of three parts. A style, (decimal, roman, or alphabetic), a prefix (a string... like "Appendix") and a starting number. It's that starting number that's the problem. Because the starting number can't be null, a number will always be appended and will always be incremented for each subsequent page.

joelgeraci
  • 4,606
  • 1
  • 12
  • 19
  • Thank you. Point taken. But surely there would be some way to script the renumbering of pages as specified in the question. In words I want to script something like: let page 4 = 100; then, if page number >= 4, then new page number = 100 - old page number + 4. What would the script for this look like? – Ad Astm Jan 06 '18 at 15:28
  • You can add just about any page numbering scheme to a form field that sits on the page but that won't change the page "label" which is what you are asking for. There is no way to script page labels that go in reverse order. I've expanded my answer to explain further. – joelgeraci Jan 06 '18 at 17:37