Copy link to clipboard
Copied
Hello,
I want to know if there is any option to number the odd pages of my document using the head and footers tool and make the numbers increment only in the odd pages.
For example, in a document of 5 pages I want to have numbered page 1 with number 1, page 3 with number 2 and page 5 with number 3.
I know there is an option to select a subset for Odd pages only in Page Range Options, but the numbers increment in every page, and it's not what i need.
I would be very grateful to any help!!!
Copy link to clipboard
Copied
I think you will have to use a custom-made script to do it. It won't work with the built-in command.
Copy link to clipboard
Copied
If you specify where on the page it should appear and what it should look like I can help you with the code for it.
Copy link to clipboard
Copied
Thank you for your answer.
It should appear on the right header and it has to be only the page number as it is shown in the picture below:
Copy link to clipboard
Copied
You can do it using this script:
for (var p=0; p<this.numPages; p+=2) {
this.addWatermarkFromText({cText: Math.ceil(p/2)+1, nStart: p, nEnd: p, cFont: "Arial", nFontSize: 8,
nHorizAlign: app.constants.align.right, nHorizValue: -72, nVertAlign: app.constants.align.top, nVertValue: -36});
}