TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My questions is very simple. How can I set security setting for a PDF file created with PDFLatex?

I should set some password or print permissions, etc.

share|improve this question

migrated from stackoverflow.com Oct 18 '11 at 8:59

This question came from our site for professional and enthusiast programmers.

up vote 33 down vote accepted

This answer, taken partially verbatim from Digital signature on TeX.SX:

Using the PDF Toolkit you can specify a separate owner and user password. Owner passwords are required when changing document properties, while user passwords may be required for performing certain actions, like printing. However, only specifying an owner password and allowing printing by default, would allow users of the document to view/read/print without authentication. You would need the following command line execution:

pdftk input.pdf output output.pdf owner_pw foo allow printing

The above commands takes as input input.pdf, sets the owner password to foo and would allow printing by any user. Modification of document settings require the owner password. See the documentation/man page and examples for more information.

share|improve this answer
Thank you very much for reply. I was useful for me, I am now using pdftk like my tool. But let me confirm one doubt... Is it no possible to add security with PdfLatex? – NeoRiddle Oct 14 '11 at 4:49
As far as I know, this is not possible directly. You need external software to encrypt the file. – Werner Oct 14 '11 at 4:54
Thank you very much again. I now understand. – NeoRiddle Oct 14 '11 at 4:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.