nicolas boccard wrote:

Hi

I've been using a .sh with the following lines

/pathto/powerpc-apple-darwin-current/pdflatex --shell-escape IOCB_ebook.tex java -classpath "/pathto/Multivalent.jar" tool.pdf.Encrypt -owner mypassword -restrict all -inplace IOCB_ebook.pdf

but it screwed the bookmark table while iText does preserve it, however the tentative line below does not work, could you correct it?

java -classpath "/pathto/itext.jar" com.lowagie.tools.plugins.Encrypt IOCB_ebook.pdf IOCB_ebook2.pdf mypassword

I'm sorry, it's not very well documented, not is it very user-friendly
as a command-line tool (it's a plug-in for the iText toolbox).
The complete sequence is something like this:
java -classpath "iText.jar" com.lowagie.tools.plugins.Encrypt
 HelloWorld.pdf Encrypted.pdf owner user 00000000 128
These are the arguments:
- srcfile
- destfile
- ownerpassword
- userpassword
- permissions: a sequence of 0 or 1
- 40 or 128 (strength)
The order of the permissions in the sequence can be found in the source code:
http://itextdocs.lowagie.com/src/com/lowagie/tools/plugins/Encrypt.java
"AllowPrinting",
"AllowModifyContents",
"AllowCopy",
"AllowModifyAnnotations",
"AllowFillIn (128 bit only)",
"AllowScreenReaders (128 bit only)",
"AllowAssembly (128 bit only)",
"AllowDegradedPrinting (128 bit only)"
br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to