• Stars
    star
    179
  • Rank 214,039 (Top 5 %)
  • Language
    Shell
  • License
    GNU General Publi...
  • Created about 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

View and modify PDF metadata on Linux graphically

PDFMtEd

PDFMtEd logo

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.

Table of contents

Components

PDFMtEd Editor

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

screenshot of PDFMtEd Editor

Features:

  • easily process multiple files and folders right from your file manager
  • preview your documents in your default PDF viewer and file manager before editing them
  • rename files based on metadata

PDFMtEd Inspector

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

screenshot of PDFMtEd Inspector

Features:

  • quickly inspect metadata right from your file manager
  • easily purge single or multiple files of all metadata

PDFMtEd Thumbnailer

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.

Installation and dependencies

The following instructions are provided for most Linux distributions.

Dependencies

Optional but recommended: sejda-console

Ubuntu 16.04 or lower

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

Most other Linux distribution based on Debian or Ubuntu

sudo apt install libimage-exiftool-perl yad qpdf

Fedora and most other Linux distribution based on Fedora

sudo dnf install perl-Image-ExifTool yad qpdf

Arch Linux or Manjaro

sudo pacman -S perl-image-exiftool yad qpdf

Dependency breakdown

Required:

  • YAD: graphical front-end for bash scripts, a Zenity fork; provided by Webupd8 PPA
  • ExifTool: general purpose metadata editing application and library
  • qpdf: command-line program that does structural, content-preserving transformations on PDF files; used in this project to restore broken PDF files and purge documents of residual metadata
  • Python 3 is required for the thumbnailer and thumbnail preview to work. This should be installed on your system by default.

Recommended:

  • Sejda: extensible and configurable PDF manipulation layer library; used to restore broken PDF files; more reliable than qpdf in this, but unfortunately not available in any repository; please use the debfile release to install sejda-console

Installation

  1. Install all dependencies

  2. Clone this repository or download the latest zipfile and extract it

  3. cd to the cloned/extracted directory, e.g.:

     cd PDFMtEd
    
  4. 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:

file manager context menu with PDFMtEd entries

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.

Uninstall PDFMtEd

Follow these steps to uninstall the PDFMted utilities:

  1. cd to the project directory, e.g.:

     cd PDFMtEd
    
  2. Run uninstall.sh as root:

     sudo ./uninstall.sh
    

Usage

General usage

  1. Use your file manager to select one or more files/directories
  2. Choose the utility you want to launch from the Open with context menu

PDFMtEd Editor

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).

User interface

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.

Command-line options

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 paths

PDFMtEd Inspector

The UI should be self-explanatory.

PDFMtEd Thumbnailer

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.

Additional information

Modified metadata tags

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

Purging metadata

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.

Known issues

  • 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
    

License

PDFMtEd copyright 2014 Glutanimate

PDFMtEd is licensed under the GNU GPLv3.

More Repositories

1

review-heatmap

Anki add-on to help you keep track of your review activity
Python
1,146
star
2

image-occlusion-enhanced

Anki add-on that transforms images into cloze tests
JavaScript
382
star
3

cloze-overlapper

Anki add-on for memorizing lists and enumerations
Python
214
star
4

anki-addons-misc

Various add-ons I've written for Anki
Python
166
star
5

wordlist-medicalterms-en

Dictionary of English medical terms for LibreOffice/OpenOffice/Android/Word
148
star
6

simple-google-tts

Use Google text-to-speech on your Linux desktop
Perl
113
star
7

syntax-highlighting

A fork of Tiago Barroso's Syntax Highlighting add-on with support for Anki 2.1
Python
103
star
8

anki-addon-builder

Build tool for Anki add-ons
Python
86
star
9

popup-dictionary

Pop-up Dictionary Add-on for Anki
Python
72
star
10

mini-format-pack

Extends Anki 2.1 with a number of additional text formatting buttons
Python
45
star
11

MoodyRain

Generate custom ambient soundscapes on Linux
Shell
41
star
12

hunspell-en-med-glut

Hunspell dictionary of English medical terms
36
star
13

pdf-glossary

PDF Glossary Export Add-on for Anki
Python
28
star
14

speed-focus-mode

Speed Focus Mode add-on for Anki
Python
27
star
15

note-organizer

Note Organizer Add-on for Anki
Python
25
star
16

unified-remote-anki

Unified Remote for Anki
Lua
25
star
17

frozen-fields

A fork of Tiago Barroso's Frozen Fields add-on with support for Anki 2.1
Python
23
star
18

colorful-tags

Colorful Tags add-on for Anki (formerly known as Hierarchical Tags 2)
Python
23
star
19

pytest-anki

A pytest plugin for testing Anki add-ons
Python
19
star
20

internal-references

Internal References Add-on for Anki
Python
18
star
21

html-cleaner

HTML Cleaner Add-on for Anki
C
17
star
22

advanced-previewer

Advanced Previewer Add-on for Anki
Python
16
star
23

anki-cli-remote

Control Anki's user interface remotely through a command-line-utility
Python
14
star
24

sequence-inserter

Sequence Inserter Add-on for Anki
Python
13
star
25

puppy-reinforcement

Puppy Reinforcement add-on for Anki
Python
13
star
26

batch-editing

Batch Editing add-on for Anki
Python
13
star
27

spotify_playlist_exporter

Parses Spotify URIs and exports track data to a CSV file
Shell
12
star
28

highlight-search-results

Highlight Search Results in the Browser add-on for Anki
Python
12
star
29

progress-bar

Progress Bar add-on for Anki
Python
12
star
30

memobeam

Beam Anki decks right into your brain!
Python
9
star
31

reset-card-scheduling

Fork of baitisj/anki-reset-card-scheduling with some added features and support for Anki 2.1
Python
9
star
32

review-feedback

Visual Feedback for Reviews add-on for Anki
Python
8
star
33

hitmarkers

Hitmarkers add-on for Anki
Python
8
star
34

SVG2PNG

Simple Nautilus script to convert SVG to PNG based on DPI or resolution.
Shell
8
star
35

sticky-searches

Sticky Searches add-on for Anki
Python
7
star
36

spell-checker-public

Temporary repository to host bug reports and documentation for the Spell Checker Anki add-on
7
star
37

codewars

My Python and Java solutions to Codewars challenges
Python
6
star
38

browser-external-note-editor

External Note Editor for the Browser add-on for Anki
Python
6
star
39

sublime-deselect

Adds a "deselect" hotkey to Sublime Text
Python
6
star
40

wordlist-medicalterms-de

Dictionary of German medical terms for LibreOffice/OpenOffice/Android/Word
6
star
41

anki-libaddon

Python
5
star
42

bettertags-public

Temporary repository to host bug reports and documentation for the BetterTags Anki add-on
5
star
43

spotify-tools

A collection of bash scripts for Spotify on Linux
Shell
5
star
44

yadPush

A simple Pushbullet GUI client for Linux
Shell
4
star
45

docs

Shared documentation for my GitHub projects
4
star
46

coronavirus-tracker

Coronavirus Tracker add-on for Anki
Python
4
star
47

sublime-open-in-nautilus

Sublime Text plugin that opens files in Nautilus (default file manager for GNOME and Unity)
Python
4
star
48

hunspell-en-med-glut-workaround

A workaround to make hunspell-en-med-glut work under LibreOffice
3
star
49

hint-hotkeys

Hint Hotkeys add-on for Anki
Python
3
star
50

anjoy-public

Temporary repository to host bug reports and documentation for the AnJoy Anki add-on
3
star
51

tempthrottlergui

GUI frontend for sepero's temp-throttle
Shell
2
star
52

github-labels-anki

Placeholder repo used for issues label sync
2
star
53

import-bug-test

Import Bug Test add-on for Anki
Python
2
star
54

exam-notifier-public

Temporary repository to host bug reports and documentation for the Exam Notifier Anki add-on
2
star
55

sublime-create-backup-copy

Sublime Text plugin that creates time-stamped backup copies of files
Python
2
star
56

sublime-make-file-executable

Sublime Text plugin that adds a quick shortcut to make the current file executable
Python
1
star
57

colorful-tags-public

Temporary repository to host bug reports and documentation for the Colorful Tags Anki add-on
1
star
58

misc-scripts

A collection of miscellaneous scripts that don't warrant a repository of their own
Shell
1
star
59

anki__Open_linked_pdf-_docs-_epub-_audio-_video-_etc_in_external_Program

HTML
1
star
60

editor-find-replace

Find and Replace in Editor Add-on for Anki
Python
1
star
61

custom-text-backup

Custom Text Backup Add-on for Anki
Python
1
star
62

edit-field-during-review-fork

Python
1
star