Encrypting and decrypting PDFs using QPDF

Saturday, March 14, 2020


If you have a password-protected PDF and want to generate a decrypted version, it’s very simple with QPDF:

$ qpdf --password=123 --decrypt input.pdf output.pdf

To avoid entering the password on the command line (perhaps you don’t want it saved in your shell history):

$ qpdf @- --decrypt input.pdf output.pdf

Then enter --password=123 and hit enter and ^D.

To encrypt a PDF, do this:

$ qpdf --encrypt userPw ownerPw 256 -- input.pdf output.pdf

Similarly, to avoid including the passwords in the command, do this:

$ qpdf --encrypt @- @- 256 -- input.pdf output.pdf

And then type the user password, hit enter, the owner password, enter, and ^D.

Tags: pdf | Posted at 22:04 | Comments (14)


Comments

KINCAIDE3 on Sunday, January 3, 2021 at 23:02

Thank you!!1

Ipl2025max on Sunday, September 21, 2025 at 10:43

nothing special

Bernardcoeds on Sunday, October 19, 2025 at 02:40

Champion Casino is an online platform where even the bonus program is unlike other gambling clubs https://madou104.ru/rus-rus/

Bernardcoeds on Sunday, October 19, 2025 at 03:28

Champion Casino is an online platform where even the bonus program is unlike other gambling clubs https://madou104.ru/rus-rus/

Bernardcoeds on Sunday, October 19, 2025 at 08:36

For sports bonuses, wager the bonus amount 5x on accumulator bets with at least three events <a href="http://morandi.phorum.pl/viewtopic.php?p=19188#19188">http://morandi.phorum.pl/viewtopic.php?p=19188#19188</a>

Bernardcoeds on Sunday, October 19, 2025 at 11:00

Terms remain accessible: 5x wagering on accumulators <a href="https://www.mrclarksdesigns.builderspot.com/board/board_topic/690695/7317246.htm">https://www.mrclarksdesigns.builderspot.com/board/board_topic/690695/7317246.htm</a>

Bernardcoeds on Sunday, October 19, 2025 at 11:51

Terms remain accessible: 5x wagering on accumulators <a href="http://aredsoaclus.phorum.pl/viewtopic.php?p=125785#125785">http://aredsoaclus.phorum.pl/viewtopic.php?p=125785#125785</a>

1win_uz_ozEi on Sunday, October 19, 2025 at 14:04

1win uz [url=https://1win5510.ru/]1win uz[/url]

Bernardcoeds on Sunday, October 19, 2025 at 23:58

Bet on sports using our online betting platform. Get the best odds <a href="https://postimg.cc/62CjL6F7">https://postimg.cc/62CjL6F7</a>

Bernardcoeds on Monday, October 20, 2025 at 00:51

Bet on sports using our online betting platform. Get the best odds <a href="https://md.chaospott.de/s/g99Yuc_eT">https://md.chaospott.de/s/g99Yuc_eT</a>

svorf_lkKl on Monday, October 20, 2025 at 08:24

Перед началом службы стоит уточнить, где именно можно подписать контракт на СВО в России. [url=https://vc.ru/social/1690460-sluzhba-po-kontraktu-v-surgute-kontrakt-na-svo-rossiya-2025]https://vc.ru/social/1690460-sluzhba-po-kontraktu-v-surgute-kontrakt-na-svo-rossiya-2025[/url] Теперь вы знаете, какие пункты работают для тех, кто хочет заключить контракт на военную службу и претендовать на выплаты.

Bernardcoeds on Monday, October 20, 2025 at 23:14

On the 1xbet betting platform, players have the opportunity to use sports betting, the casino <a href="http://alneyzeha.phorum.pl/viewtopic.php?p=89101#89101">http://alneyzeha.phorum.pl/viewtopic.php?p=89101#89101</a>

Bernardcoeds on Tuesday, October 21, 2025 at 00:05

On the 1xbet betting platform, players have the opportunity to use sports betting, the casino <a href="https://www.4shared.com/u/vX3LWS30/1xbetofficialpromocode.html">https://www.4shared.com/u/vX3LWS30/1xbetofficialpromocode.html</a>

Bernardcoeds on Tuesday, October 21, 2025 at 03:18

Pin-up offers a safe slot for all gambling and casino enthusiasts. At Pin-up slots <a href="https://xn--90asdbla8a.xn--p1ai">https://xn--90asdbla8a.xn--p1ai</a>

Add a comment

Name:
Email: (optional, not displayed to public)
URL: (do not fill this in — leave blank!)

Comment: