[pdftex] Usage of \pdfcrypt
Akira Kakuto
kakuto at fsci.fuk.kindai.ac.jp
Wed Aug 22 11:26:29 CEST 2001
From: Robert Howlett <rhowlett at mail.usyd.edu.au>
Subject: [pdftex] Usage of \pdfcrypt
> So, after reading the "readme" at ftp://bioinf.medicina.uniovi.es/pub/
> I tried putting
> \pdfcrypt{owner="me" none}
> at the start of one of my pdf files, to see what effect it had.
\pdfcrypt owner {me} none
pdfcrypt in pdfTeX-1.00a
To control this feature, I have added a new primitive named "\pdfcrypt".
If \pdfcrypt is found in the TeX source, the file is encrypted, otherwise
an unencrypted pdf file is generated as with the regular pdftex version.
\pdfcrypt must be placed early in the TeX source, before anything is
shipped out to the pdf output, otherwise it is simply ignored.
\pdfcrypt accepts the following optional parameters separated by spaces:
\pdfcrypt parameter meaning
-------------------------- ----------------------------------------
owner {the owner password} to define the owner or security password
user {the user password} to define the user or open password
print to give printing permission
copy to allow selecting text and graphics
edit to allow modifing (edit) the document
annotate to allow changing notes and form fields
all to allow all above
noprint to deny printing permission
nocopy to deny text and graphics selection
noedit to deny document modification
noannotate to deny changing notes and form fields
none to deny all above
-------------------------- ----------------------------------------
By default, no password is set, and permits are set to `all'.
Note that this syntax may still change as it is under discussion in the
pdftex list.
Usage examples:
\pdfcrypt none
or
\pdfcrypt owner {anything} none
will allow everybody to read the file but nobody will be able to print,
copy, edit or annotate.
\pdfcrypt user {Knuth} none
or
\pdfcrypt owner {Knuth} user {Knuth} none
the password 'Knuth' (without the ') allows nothing else than reading
the file. Nobody will be able to print, copy, edit or annotate.
\pdfcrypt owner {Donald} user {Knuth} none
the password 'Donald' gives full access to the file;
the password 'Knuth' allows nothing else than reading the file.
\pdfcrypt owner {Donald} user {Knuth} noprint
the password 'Donald' gives full access to the file;
the password 'Knuth' allows reading but not printing the file.
\pdfcrypt owner {Donald} user {Knuth} none print
the password 'Donald' gives full access to the file;
the password 'Knuth' allows reading and printing, but nothing else.
The following groups are equivalent:
this:
\pdfcrypt owner {Donald} user {Knuth} none print
this:
\pdfcrypt
owner {Donald}
user {Knuth}
none
print
this:
\pdfcrypt owner {Donald}
\pdfcrypt user {Knuth}
\pdfcrypt none
\pdfcrypt print
A note about Ghostscript:
* Starting from ghostscript 6.63 a fully functional pdf_sec.ps comes
already with the standard package.
* Be aware that permits are totally ignored by ghostscript.
* The files where the user password is not set are fully open anyway.
* If the user password has been set, providing it gives full access
to the file regarless of what permits have been set.
* The acrobat PDFref specs already warn that proper permit handling
is fully dependent on the viewer implementation.
--
Akira Kakuto
More information about the pdftex
mailing list