Use PDF file's embedded creation date

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi,

I'm trying to find a way to use Hazel to recognize the creation date found in some PDF files' properties (accessible hitting cmd-I in Preview), which is not the same than the creation date of a copy of the file that sits on my computer.

As an example, my bank allows me to download PDF documents that were each created on a different date in the past. If I download them today, the creation date of all the files will be today in the Finder.
As if I open the files in Preview and hit cmd-I, I will see the actual creation date of these documents.
See the difference for yourself in the following screenshots, taken for the same file.

info panel in Preview :

Image

info panel in Finder :

Image


You all guessed I'd like to have Hazel rename all theses docs using their embedded creation date.

Thanks for your answers,

Guillaume
guillaume kuster
 
Posts: 7
Joined: Thu May 17, 2012 1:37 am

Re: Use PDF file's embedded creation date Mon Jun 04, 2012 4:40 pm • by Mr_Noodle
You'll need to check the other Spotlight attributes. For instance, there might be more listed under "Plus d'infos".
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks for your answer,

So did I, but I can't see any other creation date :

Image

any clue ?
guillaume kuster
 
Posts: 7
Joined: Thu May 17, 2012 1:37 am

Re: Use PDF file's embedded creation date Tue Jun 05, 2012 11:57 am • by Mr_Noodle
If you are comfortable using the command line, you can also try the "mdls" command on the files. It does a full metadata dump. See if any of those dates correspond with the date in the file.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Well, that is the output of the mdls command on that file :

Image

no luck there then.

But if I look into the PDF with a text editor, the creation date i'm willing Hazel to use is encoded after a PDF tag as follows :

Code: Select all
%PDF-1.4
%‚„œ”
1 0 obj << /Creator (Exstream Dialogue Version 6.1.019)
/CreationDate (D:20100216221953)


Would you suggest any way to make Hazel use that ?

Thanks
guillaume kuster
 
Posts: 7
Joined: Thu May 17, 2012 1:37 am

Re: Use PDF file's embedded creation date Thu Jun 07, 2012 5:41 pm • by Mr_Noodle
You'd have to write a script to extract it. It's too bad that Apple's Spotlight importer drops the ball here but I can't think of any other way to do it now.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron