Skip to main content
Participant
May 15, 2019
Question

Batch Rename PDFs with page size

  • May 15, 2019
  • 1 reply
  • 412 views

I have 50 pdfs that are sequentially numbered, they're all different sizes. I need to rename these with the actual page sizes and number sequence. e.g. sample 1 is 3 inches x 4.5 inches, it should be as follows; Sample 1.pdf > Sample 1 3x4_5.pdf Is there a script or other that can accomplish this? Also, if it helps the PDFs where generated in Adobe Indesign.

Thanks

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
May 15, 2019

There are multiple issues with your request, although in theory it's doable.

For starters, there isn't really such a thing as the order of files in a folder. Files can be ordered using various methods. You probably mean alphabetical order. The problem is, that there's no guarantee that an Action in Acrobat Pro will process the files in this order.

So you would need to do it in two parts: First collect all the file names using an Action into a global variable and then use a script to sort that list, and then open those files and save them under the new name. Also, a script can't rename files, only save a new copy.

And, the page size of a PDF is not necessarily the same throughout. You can use the size of the first page, but the second page can have a different size. Not to mention that a PDF page has multiple boxes that define it, so even a single page can have multiple "sizes"...