Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF-file metadata: Privacy Filtering all metadata #8

Merged
merged 2 commits into from
Apr 23, 2014
Merged

PDF-file metadata: Privacy Filtering all metadata #8

merged 2 commits into from
Apr 23, 2014

Conversation

adaerr
Copy link

@adaerr adaerr commented Apr 23, 2014

This pull-request pertains to the addition of metadata to PDF files associated with entries, as triggered by the menu entry "Write XMP metadata to PDFs" in the "Tools" menu. XMP is an extremely interesting feature that allows tagging PDF files (amongst others) with automatically retrievable metadata in much the same way mp3-tags allow adding title/author/... information to mp3 music files. Actually JabRef exports the metadata not only to two XMP namespaces (Dublin Core and a custom JabRef namespace), but also to the PDF DocumentInformation Object.

Practically from the beginning of the XMP-writing capabilities of JabRef, Christopher Oezbek had added privacy filtering for the XMP-tagging of PDF-files with data from the bibtex-record, meaning that the user could define a list of fields (in Preferences->XMP metadata) which should not be exported to the PDF file. Unfortunately, the filtering was incomplete: jabref exports the metadata in three different forms, only one of which was originally filtered. In 2013 filtering was extended to both XMP namespaces, but JabRef still exported all fields into the PDF DocumentInfo object. The two present commits correct this problem. The first (b45316f) prevents private fields from being exported to the PDF DocumentInfo. The second one more agressively erases these fields even if they already exist in the PDF document.

The deletion of existing fields might be debateable. It seems the right thing to do for fields clearly generated by JabRef (viz. those prefixed by "jabref/"), but there are four fields which might be of other origin (Author,Title,Subject and Keywords). Making a systematic exception for these four fields, i.e. not erasing them even if they are privacy filtered, is a bad idea and violates the principle of least surprise. This is why the second commit makes no exception. Deactivating the erasure for the four generic fields could however easily be added as an option in the XMP export preferences if it is judged important. The current behaviour has the advantage of reliably correcting PDF files previously tagged with a buggy privacy filtering.

If these commits are pulled into the master branch and confirmed to work, the bug #869 on the sourceforge tracker:
https://sourceforge.net/p/jabref/bugs/869/
can be closed.

koppor added a commit that referenced this pull request Apr 23, 2014
PDF-file metadata: Privacy Filtering all metadata
@koppor koppor merged commit 5454ab4 into JabRef:master Apr 23, 2014
@adaerr
Copy link
Author

adaerr commented Apr 25, 2014

thx!

koppor added a commit that referenced this pull request May 20, 2014
@lenhard lenhard mentioned this pull request Jul 12, 2016
2 tasks
lucasaciole added a commit to lucasaciole/jabref that referenced this pull request Jul 18, 2017
miguel-real-miei added a commit to the-Kob/SE2122_55677_56773__56971_57066_58625 that referenced this pull request Nov 22, 2021
These pertain to tasks "Code Smell JabRef#7", "Code Smell JabRef#8" and "Code Smell JabRef#9".
Pending review by another team member.
miguel-real-miei added a commit to the-Kob/SE2122_55677_56773__56971_57066_58625 that referenced this pull request Nov 23, 2021
After review a suggested solution was altered. This document pertains to tasks "Code Smell JabRef#7", "Code Smell JabRef#8" and "Code Smell JabRef#9".
miguel-real-miei referenced this pull request in the-Kob/SE2122_55677_56773__56971_57066_58625 Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants