Thursday, February 16, 2017

Save metadata (XMP) to PDF files; from Zotero to Jabref

The question for implementing something is not "why not?" but "why?". There is no data exchange format for music, so it makes sense to tag the music files. For bib data we have formats like bibtex or RIS that—while frustratingly imperfect—do a much better job transferring data from one software to the other than the rudimentary xmp tags you suggest.

PDF metadata editor

There are some free metadata editors out there.
PDF Metadata Editor is a simple tool you can use to edit the metadata (Author, Keywors, etc.) of a PDF document.
A simple GUI editor for PDF Metadata written in java and using Apache PDFBox.

  • Support Basic, XMP Pdf, XMP Dublin Core and XMP Rights metadata
  • Unicode support,  can use all languages and encodings
  • Default values to pre-fill if not set in the PDF file
  • Rename file on Save using predefined template
  • Copy XMP to Document metadata or vice versa on Save


JabRef does have XMP-metadata support.

See the "menu" at the top of this post.

The best workflow:
  1. Zotero save your reference with "BibLateX" export format and with the name nameAuthorYear_xxxx.bib
  2. copy this file to the directory of your JabRef database
  3. import your .bib to JabRef and generate new key (you can select many files)
  4. link this ref to pdf
  5. write XMP-metadata to PDF with JabRef
If a person imports this pdf in JabRef then he will get all the bibliographic data.
Moreover you can export to many formats.
But if you export to bibLaTeX and re-import to Zotero, some fields are forgotten...

see also:

Why? Reading on a mobile device (!!!), sharing of pdfs, re-use of pdfs with other tools with different functionality (e.g. visualisation, personal data mining) - generally I use a multitude of tools on the same base for different tasks (vive free and open software).

Functionality? Basic Author, Title, Keywords would be enough, but adding and removing (part of the) metadata or batch edit the metadata would be a bonus, so I can for example add a copyright notice, use a variety of programs, whith the same file-base etc...

Thoughts: This - strangely - is a feature that has often been requested by users from a variety of biblio-software, but has not been implemented... Citavi has this task on it's to-do list since 2012 (Task# 6518)... corr: seems citavi5 has it as a test feature in their beta without batch-options...

I also notice that there is a "define PDF metadata" action in MacOS's Automator. I never did any scripting, but would it be difficult to receive 3 basic fields (Title, Author, Keywords) from Zotero and write them to the file?
Batch processing would be really useful, so the service should be able to handle several references at once, but even if it's one-at-a-time it would already be much better than copy-paste...

This has a command line version to edit pdf metadata. Should not be hard then to create a plugin but apparently zotero want to integrate that:

No comments:

Post a Comment