How to set security options for a PDF using pdflatex
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.
pdf pdftex drm
migrated from stackoverflow.com Oct 18 '11 at 8:59
This question came from our site for professional and enthusiast programmers.
add a comment |
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.
pdf pdftex drm
migrated from stackoverflow.com Oct 18 '11 at 8:59
This question came from our site for professional and enthusiast programmers.
add a comment |
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.
pdf pdftex drm
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.
pdf pdftex drm
pdf pdftex drm
edited Dec 20 '14 at 13:52
Martin Schröder
12.9k640125
12.9k640125
asked Oct 13 '11 at 5:34
IsraelIsrael
3881510
3881510
migrated from stackoverflow.com Oct 18 '11 at 8:59
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Oct 18 '11 at 8:59
This question came from our site for professional and enthusiast programmers.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
1
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
4
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
add a comment |
As pdftk
is no longer easily available for certain Linux distributions (or no longer easy to keep track of what is going on), another option is qpdf
. Password protection is possible. The basic syntax is:
qpdf infile.pdf --encrypt <userpwd> <ownerpwd> <key length> [ restrictions ] outfile.pdf
Where,
- one or both of
<userpassword>
and<ownerpassword>
may be empty strings
key length
may be40
,128
, or256
and the higher the value the more restrictions one can impose on the use of the pdf.
For example,
qpdf infile.pdf --encrypt usr own 128 --print=none -- outfile.pdf
should prevent unauthorized printing.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f31901%2fhow-to-set-security-options-for-a-pdf-using-pdflatex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
1
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
4
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
add a comment |
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.
1
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
4
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
add a comment |
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.
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.
edited Apr 13 '17 at 12:34
Community♦
1
1
answered Oct 13 '11 at 6:46
WernerWerner
448k719921697
448k719921697
1
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
4
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
add a comment |
1
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
4
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
1
1
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
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
4
4
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
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
add a comment |
As pdftk
is no longer easily available for certain Linux distributions (or no longer easy to keep track of what is going on), another option is qpdf
. Password protection is possible. The basic syntax is:
qpdf infile.pdf --encrypt <userpwd> <ownerpwd> <key length> [ restrictions ] outfile.pdf
Where,
- one or both of
<userpassword>
and<ownerpassword>
may be empty strings
key length
may be40
,128
, or256
and the higher the value the more restrictions one can impose on the use of the pdf.
For example,
qpdf infile.pdf --encrypt usr own 128 --print=none -- outfile.pdf
should prevent unauthorized printing.
add a comment |
As pdftk
is no longer easily available for certain Linux distributions (or no longer easy to keep track of what is going on), another option is qpdf
. Password protection is possible. The basic syntax is:
qpdf infile.pdf --encrypt <userpwd> <ownerpwd> <key length> [ restrictions ] outfile.pdf
Where,
- one or both of
<userpassword>
and<ownerpassword>
may be empty strings
key length
may be40
,128
, or256
and the higher the value the more restrictions one can impose on the use of the pdf.
For example,
qpdf infile.pdf --encrypt usr own 128 --print=none -- outfile.pdf
should prevent unauthorized printing.
add a comment |
As pdftk
is no longer easily available for certain Linux distributions (or no longer easy to keep track of what is going on), another option is qpdf
. Password protection is possible. The basic syntax is:
qpdf infile.pdf --encrypt <userpwd> <ownerpwd> <key length> [ restrictions ] outfile.pdf
Where,
- one or both of
<userpassword>
and<ownerpassword>
may be empty strings
key length
may be40
,128
, or256
and the higher the value the more restrictions one can impose on the use of the pdf.
For example,
qpdf infile.pdf --encrypt usr own 128 --print=none -- outfile.pdf
should prevent unauthorized printing.
As pdftk
is no longer easily available for certain Linux distributions (or no longer easy to keep track of what is going on), another option is qpdf
. Password protection is possible. The basic syntax is:
qpdf infile.pdf --encrypt <userpwd> <ownerpwd> <key length> [ restrictions ] outfile.pdf
Where,
- one or both of
<userpassword>
and<ownerpassword>
may be empty strings
key length
may be40
,128
, or256
and the higher the value the more restrictions one can impose on the use of the pdf.
For example,
qpdf infile.pdf --encrypt usr own 128 --print=none -- outfile.pdf
should prevent unauthorized printing.
answered Mar 13 at 3:48
jonjon
19.9k24092
19.9k24092
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f31901%2fhow-to-set-security-options-for-a-pdf-using-pdflatex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown