Set PDF Metadata using filename

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Set PDF Metadata using filename Sun Apr 22, 2012 1:05 pm • by davale
I'm looking for a way to set the PDF Metadata using the filenames Hazel has created for me. Ideally this workflow should result in the Title, Author and Subject fields being set by copying (parts) of the filename.

Hazel is creating my filenames as: 'Company YYMMDD - Subject'. I've been using Automator trying to set the Title as the complete filename (without the extension PDF), Author as Company and Subject as Subject.

So far I've been struggling with 'Set PDF Metadata' in Automator but this action probably doesn't allow the use of variables. I'm new to Automator so it's probably me but if anyone could point me in the right direction it would be much appreciated.
davale
 
Posts: 4
Joined: Fri Oct 09, 2009 4:12 pm

Re: Set PDF Metadata using filename Mon Apr 23, 2012 1:33 pm • by Mr_Noodle
Sorry, don't have an answer as I haven't dealt with that Automator action before. Just wanted to point out that I moved the topic out of the Tips forum as (as the sticky up top there notes) is only for people providing tips, not asking for them.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Set PDF Metadata using filename Tue Apr 24, 2012 4:49 am • by davale
Sorry for posting in the wrong section.

Is there any other way then using Automator for setting PDF Metadata I could try? Somehow it strikes me as odd that I would be the first looking for a solution for this.
davale
 
Posts: 4
Joined: Fri Oct 09, 2009 4:12 pm

Re: Set PDF Metadata using filename Sat Apr 22, 2017 5:56 pm • by DaveB
I have this question too. I realize this is an old thread but I'd like to reinvigorate the issue.

I’d like to find a way to write a Hazel rule to update the internal PDF metadata fields. In particular I’d like to create a script or a rule that writes the current "Date Created” from the MacOS file system, into the PDF “Creation Date” meta data property.

If I could do this, then my documents would be portable to external file systems, NAS storage devices, Dropbox etc, in a way that would preserve this data independent of those filesystem limitations.

DETAILS:

I’m using Eaglefiler to store my paperless library of PDF scanned docments. I have more than 7 years worth of documents stored in my Eaglefiler library. I’ve developed an effective automated workflow using Hazel that works well for me.

I use Hazel and a set of individualized rules to import newly scanned or downloaded documents into Eaglefiler. My workflow includes a step to alter the File Creation date, because often I scan documents that were created weeks before I scan them. I also assign MacOS file attributes like colored tags and keywords when I import new documents into Eaglefiler.

Recently I’ve been looking at the option to store my document library in a new place where I can access them from other computers and portable devices via the cloud. But every option of storing my document library remotely seems to involve losing the file properties including the Date Created as well as other keywords and colored tags.

It occurred to me that since almost all of my documents are PDF files, it would be really cool if I could preserve these file attributes inside the PDF files as PDF keywords and metadata.

PDF files have an internal set of properties including Title, Author, Subject, PDF Producer, Content Creator, Creation Date, Modification Date, plus an array of keywords.

My research seems to indicate that an Automator script may be the key to writing PDF metadata using the "Set PDF Metadata” method. But I’m not very familiar with Applescript.

Can anyone help please?
DaveB
 
Posts: 25
Joined: Sat Apr 02, 2016 7:56 pm


Return to Open Discussion