PDFMtEd (PDF Metadata Editor) is a set of tools designed to simplify working with PDF metadata on Linux. The utilities hosted in this repository are graphical front-ends to the marvelous ExifTool by Phil Harvey.
Overview
PDFMtEd Editor is an easy-to-use graphical metadata editor that supports viewing and modifying all major metadata fields found in PDF documents.
Screenshot
Features:
Overview
PDFMtEd Inspector is a general purpose metadata viewer and cleaner. Aside from granting a quick and easy insight into the meta information stored in your files, it also allows you to quickly and effectively purge all metadata.
While it can handle all file formats supported by exiftool, PDFMtEd Inspector was primarily designed with PDF files in mind.
Screenshot
Features:
Overview
PDFMtEd Thumbnailer provides the thumbnail previews for the utilities hosted in this repository. It also acts as a general purpose thumbnailing script that can recursively generate thumbnails for one or more directories.
PDFMtEd Thumbnailer should be able to generate thumbnails for all file types supported by Nautilus/GNOME's thumbnailing back-end.
Note: pdfmted-thumbnailer
was written by James Henstridge as part of an AskUbuntu Q&A.
The following instructions are provided for most Linux distributions.
Optional but recommended: sejda-console
Install all dependencies on Ubuntu with the following commands:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install yad libimage-exiftool-perl qpdf
sudo apt install libimage-exiftool-perl yad qpdf
sudo dnf install perl-Image-ExifTool yad qpdf
sudo pacman -S perl-image-exiftool yad qpdf
Required:
Recommended:
sejda-console
Install all dependencies
Clone this repository or download the latest zipfile and extract it
cd
to the cloned/extracted directory, e.g.:
cd PDFMtEd
Run the provided installer:
sudo ./install.sh
(If your file manager supports custom scripts you can just copy the PDFMtEd
folder to the default scripts path instead (instructions for Nautilus))
After the installation PDFMtEd Editor and Inspector should be available as entries in the Open with context menu:
If you can't find the entries click on Other application (arrow) and navigate to Show other applications. You should be able to find the PDFMtEd launchers in the list. Double-click on PDFMtEd Inspector to open the application. This will automatically add a context menu entry. Repeat the procedure for PDFMtEd Editor and you are set.
Follow these steps to uninstall the PDFMted utilities:
cd
to the project directory, e.g.:
cd PDFMtEd
Run uninstall.sh
as root:
sudo ./uninstall.sh
Important note: All changes introduced by ExifTool, and in turn PDFMtEd Editor, are potentially reversible, which might be a security issue under some circumstances.
PDFMtEd Inspector (not the Editor!) works around this by using qpdf
to purge PDF files of all existing metadata (further reading: Purging metadata).
Here are some helpful pointers:
you can use the next/previous buttons to navigate between files
you can transfer metadata to the next file by selecting Copy tags over to next/previous file option
renamed files follow this naming scheme: ${AUTHOR} - ${TITLE} - ${YEAR}
You can change the scheme by modifying the update_filename
function in pdfmted-editor
(I haven't implemented a proper setting for this, yet)
exiftool
will sometimes fail at updating the metadata of a document. In most cases this is because the PDF file is malformatted. PDFMtEd automatically detects these errors and prompts you to try to repair the file via qpdf
or sejda-console
. Personally, I've had more success with Sejda than qpdf, so I'd recommend choosing that option if you are able to install sejda-console
.
There are a couple of command-line switches that might be interesting:
-r
will instruct PDFMtEd Editor to check the rename option by default-u
enables parsing of URIs instead of file pathsThe UI should be self-explanatory.
Call pdfmted-thumbnailer
from the command-line to generate thumbnails:
pdfmted-thumbnailer <file(s) or folder(s)>
E.g.:
pdfmted-thumbnailer "file.pdf" "/home/user/Documents" "file2.pdf"
This would generate thumbnails for file.pdf
, file2.pdf
, and all compatible files found under /home/user/Documents
and all of its sub-folders.
PDF documents use a variety of different metadata formats to store meta information.
The oldest and most common tag system is the PDF Info dictionary. This is the metadata system CLI tools like pdfinfo
or the Properties dialog of various GNOME applications parse.
PDF editors like Adobe Acrobat additionally use the more recent XMP metadata format.
To avert confusion and ensure consistency across different PDF handlers it is important to keep these two metadata systems synchronized. That's why each field in PDFMtEd Editor's user interface controls two separate metadata tags:
UI field | PDF Info dictionary entry | corresponding XMP Dublin Core namespace tag |
---|---|---|
Author | Author | Creator |
Title | Title | Title |
Year | CreateDate | Date |
Keywords | Keywords | Subject |
Subject | Subject | Description |
Removing PDF metadata is not as straightforward as you might think. As stated before, exiftool
operations are reversible, so removing all PDF tags with exiftool -all:all=""
is no good on its own.
Only by rebuilding the PDF file (e.g. with qpdf
) we can ensure that all orphan data is purged irreversibly.
Note: This method does not remove metadata included in embedded objects (e.g. images, vector graphics). To see if your file contains any residual metadata entries you could use a tool like strings that can look for printable strings in binary data such as PDF files.
the Webupd8 PPA currently hosts a GTK2 version of YAD. This build is affected by a bug that prevents text labels from aligning properly. As a result, the UI might look somewhat disjointed.
If you don't want to wait for a fix you can directly compile the YAD GTK3 build from source. Provided your system satisfies all dependencies mentioned on the YAD project page, you may compile and install YAD with the following routine:
svn checkout svn://svn.code.sf.net/p/yad-dialog/code/trunk yad-dialog-code
cd yad-dialog-code
autoreconf -v -i
./configure --with-gtk=gtk3
make
sudo make install
PDFMtEd copyright 2014 Glutanimate
PDFMtEd is licensed under the GNU GPLv3.