Remove DRM from PDFs by faking a JetDirect server
Even though I’ve literally purchased a couple of the ISO standards, I’m unable to open the files on Linux without access to a Windows VM (within which I can run their stupid PDF de-DRM-er).
Out of pure spite, I’ve come up with the following one-liner that will set up a fake JetDirect-esque server (TCP 9100) and then run the received output via sed (and remove the DRM); simple as that. Wanky Windows environment required for “printing” the PDF but not required for access to the outputted non-DRM PDF.
Note this is not about removing DRM from a document to which you do not have access; it relies on being able to print the PDF.
You will need to have ps2pdf and nc / netcat on your box.
On Fedora/RHEL/CentOS:
yum install ghostscript nc
On Debian:
apt install ghostscript netcat
Then all we want is to set up the server on 9100:
nc -l 9100 | sed '/No Re-Distill/,/No Re-Distill/d' \
| ps2pdf - output.pdf
Obviously, reconfigure any firewalls in the way of clients attempting to connect to 9100.
Then in your Windows / Mac OS, “install” the local “JetDirect” printer, and it’ll appear as a print destination within Adobe Reader. Once “printed”, the de-DRM-ed pdf will end up as output.pdf.