Copy link to clipboard
Copied
Need help writing java code to number only the odd pages of a pdf file consecutively. I know this can't be done in adobe natively because it will skp every other number if I apply the numbering to only the odd pages. I think this is possible with some java code but I am not familiar with java, I have experience with C++.
Copy link to clipboard
Copied
It isn't Java, it's JavaScript. It may seem I'm being picky (and I am), but Java is another, entirely different language. So if you go Googling for Java and Acrobat you'll find largely weird, unhelpful, and confusing stuff. It's never abbreviated to Java; at a push you could say JS, but the full name will serve you better.
Copy link to clipboard
Copied
You can use the addWatermarkFromText method to do it. Where do you want the text to appear, and what should it look like?
Copy link to clipboard
Copied
I would like to see text in the bottom right corner of the page. Only odd-numbered pages need consecutive numbering. Please help with javascript
Copy link to clipboard
Copied
If you want to write the code yourself you will need to read the documentation of the method I mentioned above.
Or you can use this (paid-for) tool I've created that will allow you to do it without having to write any code:
https://www.try67.com/tool/acrobat-reader-advanced-add-header-footer-text