Modern PDF security
Command Line – PDF Security

© Lead Image © Bram Janssens, 123RF.com
PDFs, the preferred format for file sharing, only offer primitive privacy and security measures. With these command-line tools, you can help your PDFs meet modern security requirements.
First released in 1992, the Portable Document Format (PDF) shows no signs of disappearing. The format has become a business standard and the preferred format for sending files to a print shop. Closely related to PostScript (PS), PDF has the advantages of ensuring that files are seen exactly as the user intended and of eliminating concerns about the supported formats or available fonts on the recipient's word processor. Yet for all these advantages, the PDF format comes from an era less concerned with privacy and security. It does include privacy and security permissions, but these are primitive by modern standards. In fact, these tools are literally a joke. As I have heard several times, PDFs exist in one of two states: compromised and about to be compromised. Fortunately, the means exist to address issues that the PDF format itself does not. In addition to the countless scripts available for editing PDF content and structure, there are also a growing number that enhance privacy and security.
PDF password protection continues to be used for the simple reason that it is widely available. LibreOffice users, for example, can set it by selecting File | Export As | Export As PDF… | Security. From this path, a password can be set to open a PDF file, as well as grant permission for if and how the file can be printed, edited, or copied. These settings will control a PDF file's use by unsophisticated users, but they are no match for modern cracking tools. Aside from the laxness with which many users handle security, if the file is read in an environment in which the reader can control permissions (i.e., in most modern operating systems), the password protection is easily and quickly bypassed [1]. LibreOffice itself provides stronger protection with the option of using a digital signature or a personal GPG key by selecting File | Export As | Export As PDF… | PDF Options | Digital Signatures (Figure 1). While this option guarantees the sender's identity, it does not cover every circumstance.
Depending on your purpose, you may want to use one of the scripts found in the repositories of Debian and other major distributions. Some of these scripts can carry out numerous functions, but here I will only detail their privacy and security functions. Note that several have no man page, instead offering only a brief help option, which should be enough to figure out their use.
[...]
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

News
-
CIQ Releases Security-Hardened Version of Rocky Linux
If you're looking for an enterprise-grade Linux distribution that is hardened for business use, there's a new version of Rocky Linux that's sure to make you and your company happy.
-
Gnome’s Dash to Panel Extension Gets a Massive Update
If you're a fan of the Gnome Dash to Panel extension, you'll be thrilled to hear that a new version has been released with a dock mode.
-
Blender App Makes it to the Big Screen
The animated film "Flow" won the Oscar for Best Animated Feature at the 97th Academy Awards held on March 2, 2025 and Blender was a part of it.
-
Linux Mint Retools the Cinnamon App Launcher
The developers of Linux Mint are working on an improved Cinnamon App Launcher with a better, more accessible UI.
-
New Linux Tool for Security Issues
Seal Security is launching a new solution to automate fixing Linux vulnerabilities.
-
Ubuntu 25.04 Coming Soon
Ubuntu 25.04 (Plucky Puffin) has been given an April release date with many notable updates.
-
Gnome Developers Consider Dropping RPM Support
In a move that might shock a lot of users, the Gnome development team has proposed the idea of going straight up Flatpak.
-
openSUSE Tumbleweed Ditches AppArmor for SELinux
If you're an openSUSE Tumbleweed user, you can expect a major change to the distribution.
-
Plasma 6.3 Now Available
Plasma desktop v6.3 has a couple of pretty nifty tricks up its sleeve.
-
LibreOffice 25.2 Has Arrived
If you've been hoping for a release that offers more UI customizations, you're in for a treat.