Skip to main content
May 22, 2022
Question

How can I number only the odd pages of a pdf file consecutively?

  • May 22, 2022
  • 2 replies
  • 1043 views

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++.

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
May 22, 2022

You can use the addWatermarkFromText method to do it. Where do you want the text to appear, and what should it look like?

Participant
June 2, 2022

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

try67
Community Expert
Community Expert
June 2, 2022

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

 

Legend
May 22, 2022

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.