Wednesday, November 7, 2012

how to change pdf metadata

Today I was trying to organize my virtual lib of pdf and I discovered that not always the metadata are consistent.
I was having troubles with adobe digital editions seeing my books as "weird strings" titled when the meta info were missing.
Out of curiosity I looked at the PDF 1.7 specification (freely available from the Adobe PDF Reference Archive). On page 843 it states clearly, "A document's metadata may also be added or changed by users […]", so I wonder how... 

PDFInfo is free and works on a single file or a folder of files... well it does not really work since there is a bug, but I have a workaround that I'd like to share: 
  • use pdfinfo 
  • open the pdf with preview and save a version 
this last operation make the changes effective 

Other than this dirty wa I found no clue to automate the process: Automator should have been the right tool, but, unfortunately, Set PDF Metadata does not accept variables as inputs. Equally unfortunately, AppleScript does not have a means of editing PDF metadata.

all for now alex 

No comments:

Post a Comment