Ask Your Question
1

Password protected PDF file

asked 2015-06-03 16:23:32 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

How do I password protect a PDF file in Fedora 22? When I ran Ubuntu I used pdftk to that end. Example:

pdftk a.pdf output b.pdf user_pw foo

I tried mcpdf : https://github.com/m-click/mcpdf . However, when I do

java -jar mcpdf.jar a.pdf output b.pdf user_pw foo

I get an error message: java.lang.RuntimeException: Missing "-" after output operation.

Suggestions are welcome.

[cribari@darwin4 slides] $ dnf list installed | grep jdk
Failed to synchronize cache for repo 'livna' from 'http://rpm.livna.org/mirrorlist': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried, disabling.
java-1.8.0-openjdk.x86_64            1:1.8.0.45-39.b14.fc22              @System
java-1.8.0-openjdk-devel.x86_64      1:1.8.0.45-39.b14.fc22              @System
java-1.8.0-openjdk-headless.x86_64   1:1.8.0.45-39.b14.fc22              @System
jdk1.8.0_45.x86_64                   2000:1.8.0_45-fcs                   @System

edit retag flag offensive close merge delete

Comments

libreoffice - export the document as a PDF, you can set a password when you export. if needed, import a pdf first , then export it

bodhi.zazen gravatar imagebodhi.zazen ( 2015-06-03 23:18:58 -0500 )edit

My PDF files are generated from LaTeX and contain a large number of formulas, tables, graphics etc. I also use some specialized fonts. Some of that is lost when I import the PDF into Libreoffice.

cribari gravatar imagecribari ( 2015-06-04 04:33:13 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2015-06-04 01:01:49 -0500

deadrat gravatar image

We had that command line utility called pdftk but it was removed from fedora repositories due to licensing issues of a dependency.

The alternatives were discussed in here.


Or you could use libreoffice. Open the document that you want to protect, then export it and you can choose the security options to protect it.

edit flag offensive delete link more

Comments

1

My PDF files are generated from LaTeX and contain a large number of formulas, tables, graphics etc. I also use some specialized fonts. Some of that is lost when I import the PDF into libreoffice.

cribari gravatar imagecribari ( 2015-06-04 04:33:21 -0500 )edit
0

answered 2018-06-29 04:16:19 -0500

LibreOffice is by no means the worst software I've ever used for purposes of working with PDF documents at all. If you consider doing so with non-software tools as well, might well try this one https://edit-pdf.pdffiller.com/ But it's not free, nevertheless you may get a free trial period and do exactly what you need if that's a one-time purpose of yours

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-06-03 16:23:32 -0500

Seen: 8,204 times

Last updated: Jun 04 '15