Andrei Popov wrote:
Hello Paul,
Thursday, December 1, 2005, 1:47:50 AM, you wrote:
I'm stumped about how to generate PDF files from LyX that readers
can annotate. As far as I can tell, the problem is that several
permissions (including annotation) are off by default when pdflatex
emits its output. I've tried using pdftk and Multivalent to change
those permissions, but apparently Acrobat Reader uses the more
restrictive of the permissions on the source document and the
permissions added/removed by the program (e.g., pdftk) generating
the modified output. That makes sense; otherwise I could use it to
undo restrictions set by an author.
I have successfully used iText-based PDFTrans utility from command
line to modify pdf metadata and set the encryption options. You can
also use iText directly (see its online manual for details.) Btw,
pdftk also uses a modified version of iText.
If I'm right, what I need is a way to generate an initial PDF file
with all permissions set on. I can't find anything in the hyperref
manual about this, and Google (including Google Groups) has failed
me. Any ideas?
Andrei,
Thanks for the response. I'm having no success with PDFTrans (or
pdftk), and I'm not sure whether it has anything to do with being on the
Windows platform. I have a document test.pdf that was created from LyX
using pdflatex. The security tab of Acrobat Reader's document
properties page has two sections ("Document Security" and "Document
Restrictions Summary") that both list permissions. Empirical evidence
suggests that the document security section lists what permissions were
set based on any password used, and the document restrictions summary
shows what permissions are in effect. The test.pdf document is
unprotected, so the button to list permissions in the document security
section is grayed out. The document restrictions summary allows
printing, copying and form fill-in, but not assembly, commenting,
signing, creating template pages or submitting forms. That seems to be
the default permissions for unsecured documents.
If I use PDFTrans to add other permissions, but do not add passwords,
the output document (test2.pdf) has identical permissions to test.pdf.
If I use PDFTrans to add both permissions and a user password, then two
things change in the output file: (1) the details button of the
document security section becomes active, and lists the permissions I
set using PDFTrans (and only those permissions); and (2) the document
restrictions summary lists the conjunction (AND) of the permissions I
set and the permissions test.pdf already had. There's one exception to
the AND operation: fill-in remains permitted even if I don't list it as
one of the permissions in the PDFTrans command.
The restrictions summary seems to govern what Acrobat Reader allows.
Even if I set a user password and allow modify-annotations (and open the
document with the user password), I still cannot annotate it in Reader.
A typical (unsuccessful) run looks like this:
pdftrans --user-password abc --permissions
modify-contents,modify-annotations,print test.pdf test2.pdf
Am I doing something wrong (other than using Reader on Windows, which is
out of my hands)?
Thanks,
Paul