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.
https://github.com/zaro/pdf-metadata-editor
PDF Metadata Editor is a simple tool you can use to edit the metadata (Author, Keywors, etc.) of a PDF document. http://broken-by.me/pdf-metadata-editor/
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

https://code.google.com/p/pdf-meta/
http://sourceforge.net/projects/exiftool/

JabRef

JabRef does have XMP-metadata support.
http://help.jabref.org/fr/XMP
https://github.com/JabRef/jabref

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:
http://stephane-mottin.blogspot.fr/2017/02/jabreforg-reference-manager-bibtex-mods.html
http://stephane-mottin.blogspot.fr/2017/02/zotero-transformer-reference-livre-en.html

---
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 https://code.google.com/archive/p/pdf-meta 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: https://github.com/jlegewie/zotfile/issues/137

https://forums.zotero.org/discussion/comment/241422#Comment_241422

2 comments:

  1. Thanks for sharing this post. I'm very interested in this topic. Please check out this useful website onlineconvertfree.com Though largely, folks want making use of instruments for which they needn't pay however on the identical time there's plenty of demand for high-tech superior shareware utilities which have many options to make the conversion processes straightforward and cozy for customers.

    ReplyDelete