Edit PDF metadata tags on Linux with a GUI
To edit PDF metadata tags on Linux with a GUI, we use Master PDF Editor or PDFMtEd. Why 2 tools? Since neither of these two is anywhere near perfect in my opinion, users should decide which one best suits their needs. PDFMtEd is a bit strange to run and uses the old Python 2, but it’s lightweight and made with open source tools, while Master PDF Editor is a complete suite for editing PDF files, so it uses a fair amount of system resources and is not free is and open source software either.
Using Master PDF Editor to Edit PDF Meta Tags on Linux
Master PDF Editor is a proprietary application for editing PDF documents on Linux, Windows and macOS. It can create, edit (insert text or images), annotate, view, encrypt and sign PDF documents. It also allows editing (and viewing) the following PDF metadata tags: Title, Subject, Author, Creator, Producer, and Keywords.
Download the Master PDF Editor by clicking its. to visit Download page (it’s available for CentOS, RedHat, and Ubuntu – I haven’t tried to see if it runs on Debian).
It’s worth nothing that Version 5 Master PDF Editor removed some features from its free version, like editing or adding text, inserting images, and more, and such features require you to purchase the app or else it will become a watermark added to your PDF documents. However, this does not apply to editing the PDF metadata. Even so, there is also the alternative of using the latest version of Master PDF Editor 4, which is free for non-commercial use without any restrictions.
to Edit / add / remove metadata from PDF files with the Master PDF Editor, open a PDF with it and then from the application File
Menu click on Properties
, and you’ll see editable PDF metadata tag fields on the Document Info
Tab.
PDF Related: How to Convert PDF to Image (PNG, JPEG) Using GIMP or pdftoppm Command Line Tool
Using PDF Arranger to Edit PDF Metadata on Linux
Edit Properties
. Once you see the PDF Meta Tags window, double click on a tag to edit it:- Debian / Ubuntu / Linux Mint / Pop! _OS etc .:
sudo apt install pdfarranger
- Fedora:
sudo dnf install pdfarranger
- Arch Linux / Manjaro:
sudo pacman -S pdfarranger
- Operating system only:
sudo eopkg install pdfarranger
Using PDFMtEd to Edit PDF Meta Tags on Linux
PDFMtEd (PDF Metadata Editor) is a set of tools that make working with PDF metadata on Linux easier, consisting of a PDF metadata editor, a PDF inspector (for viewing complete PDF metadata and optionally deleting all PDF metadata ) and a PDF thumbnailer. The PDF Metadata Editor can handle multiple files and folders and can also be used to rename files based on PDF metadata.
This tool allows editing the following PDF meta tags: author, title, year, keywords and subject.
Let’s install PDFMtEd (PDF Metadata Editor). The tool needs YAD, ExifTool, and Qpdf to run, while Git is needed to pull the code from its GitHub repository. You can also install Sejda If you want an extensible and configurable PDF manipulation layer library that is recommended but not required for PDFMtEd to run.
Let’s install these (except for Sejda which is not available in the repositories):
- Debian, Ubuntu, Linux Mint, Pop! _OS, Zorin OS, Elementary OS and any other Linux distribution based on Debian or Ubuntu:
sudo apt install libimage-exiftool-perl yad qpdf git
- Fedora:
sudo dnf install perl-Image-ExifTool yad qpdf git
- CentOS / RHEL:
sudo yum install perl-Image-ExifTool yad qpdf git
- Arch-Linux, Manjaro:
sudo pacman -S perl-image-exiftool qpdf git
You have to YAD. to install by AURas it is not in the Arch repositories.
- openSUSE:
sudo zypper install exiftool yad qpdf git
- Operating system only:
sudo eopkg install perl-image-exiftool yad qpdf git
You also need to have Python2 on your system for this to work.
Now let’s clone the PDFMtEd repository and install the application (and also create 3 folders which, if not there, will cause the installation to fail):
sudo mkdir -p {/usr/local/share/applications,/usr/local/share/icons/hicolor/scalable/apps,/usr/local/bin}
git clone https://github.com/glutanimate/PDFMtEd
cd PDFMtEd
sudo ./install.sh
Warning: Never run a script that you haven’t written without knowing what it is doing. Before you run this script, take a look at his code.
now to use PDFMtEd, Right click on a PDF file in your file manager, e.g. Nemo, select Open With -> PDFMtEd - Editor
open the selected PDF document to edit its metadata tags, or Open With -> PDFMtEd - Inspector
to open the PDF Document Inspector. If it’s not listed there, click Other application
and add it from there. For example, in Nautilus, right-click the file and select Open with other application
, then search for PDFMtEd – Editor and PDFMtEd – Inspector.
This is required because PDFMtEd is not added to the application menu and takes a PDF file as an argument when you run it.
If you cannot find PDFMtEd in your file manager Open With
Options you may have to restart your session (logout / login).
Users who want to uninstall PDFMtEd must have the uninstall.sh
Script as root (this script is available in the directory where you cloned PDFMtEd), e.g.
cd PDFMtEd
sudo ./uninstall.sh
PDF Related: How to Convert PDF to Text on Linux (GUI & Command Line)
Edit PDF metadata tags from the command line on Linux
There are several tools for Linux that can edit PDF metadata including ExifTool, pdftk, Ghostview, and probably others, but for this article we’ll focus on ExifTool, which I think is the easiest to use.
ExifTool is a platform-independent Perl library and command line application for reading, writing, and manipulating meta information in a wide variety of files. For PDF documents, ExifTool supports the writing of native PDF and XMP metadata; It supports tags like title, author, subject, keywords, creator and producer, and more.
Install ExifTool on Linux:
- Debian, Ubuntu, Linux Mint, Pop! _OS, Zorin OS, Elementary OS and any other Linux distribution based on Debian or Ubuntu:
sudo apt install libimage-exiftool-perl
- Fedora:
sudo dnf install perl-Image-ExifTool
- CentOS / RHEL:
sudo yum install perl-Image-ExifTool
- Arch-Linux, Manjaro:
sudo pacman -S perl-image-exiftool
- openSUSE:
sudo zypper in exiftool
- Operating system only:
sudo eopkg in perl-image-exiftool
Now you can Edit the PDF meta tags on Linux using the ExifTool command line tool (this is a single command):
exiftool -Title="PDF Title" -Author="Author Name" -Subject="PDF Subject" -Keywords="keyword1;keyword2" -Creator="Name of application used to create the PDF" -Producer="PDF producer name or note" myPDFdocument.pdf
What the PDF tags represent in this command should already be explained by the values I used. Remember to replace myPDFdocument.pdf
with the name (and path, if this is not available in the current directory) of the PDF file for which you want to change the PDF tags.
You can skip some of the tags that I mentioned in this command. In this case, the PDF will continue to use its original tag (if any). By default, ExifTool creates a backup of the original PDF document using the name followed by _original
. You can skip this and overwrite the original file by appending it -overwrite_original
to command.
You can view a full list of the tags ExifTool supports for PDF files on this page.
ExifTool can also be used to read the PDF metadata tags. To view all PDF tags with ExifTool use:
exiftool -all:all myPDFdocument.pdf
It is important to note that the metadata edits made with ExifTool are reversible, ie “a potential security issue as old information is never actually deleted from the file“explains the ExifTool Page with PDF tags. However, you can permanently remove the old PDF metadata information by using qpdf. use, with:
qpdf --linearize in.pdf out.pdf
At this command in.pdf
is the PDF for which you want to remove the old metadata information, and out.pdf
is the resulting PDF file name.
PDF Related: How to Create Fillable PDF Forms Using LibreOffice Writer