You need to save it under the new name first.
It can only be done if you install a script on the local machine of each
user of the PDF file. Is that the case?
--- NEW CODE GOES HERE TO RENAME THE PDF ---
I'm surprised any of this code works at all on the iPad. Which app are you
using to view the PDF files?
The app is PDF Expert.
Correct. I highly doubt the save-as script will work in that application,
but you can try...
Did you ever find a solution to your initial problem?
I'm trying to figure out how to do the same.