These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Script to change PDF date according to the date inside the PDF Propert

verm00
Registered: Jan 18 2008
Posts: 2

I have a bunch of files that where "undeleted" with data recue. When the file were retrieved they all have the date of the day I retrieved them. But if I open the PDF and check the doc properties it will show me the original date the PDF was created. Is it possible to get a script that would get that date and then change it so the computer displays the real creation date?

We are talking about close to 20 k files ... can't do it manually.

Thanks

My Product Information:
Acrobat Pro 8.1.1, Macintosh
dthanna
ExpertTeam
Registered: Sep 28 2005
Posts: 248
What you are going to want to do is write a batch JavaScript that writes to pieces of data to a PDF Report (see Report in the JS manual) - the date you need and the file name. Make your page layout as simple as possible - but include necessary delimiters.

Save the report .PDF to a text file (some massaging may need to be done).

Now, write custom code that will set the file creation date to the date listed in the extract file. This can be tricky as the system will always want to save the file at the current date.

You need to do some system hacking to get around this. There used to be a small .EXE or .COM command line program that used to do this - change the system date to an older date. But is is lost in the annuals of a hard-drive crash.

If you cannot find any direct code, make a call to change the system date to the older date, copy the file, then change the system date to the next file and so on... this may work as well. 1) Don't forget to change the system date back 2) Document what you did and why just in case you have a meeting with someone that has Esq (esquire) after his/her name. (http://legal-dictionary.thefreedictionary.com/Esq)

Enyoy!

Douglas Hanna is a member of the Production Print Technology team at Aon.
www.aonhewitt.com