Hi,
I'm using iText to create a pdf document by merging an
fdf with an original pdf. The original pdf is provided
to us by the client and has security method as
"password security". I will not know the password when
this gets deployed.
The client expects that the resultant pdf (pdf after
doing the merge) retain the "password security" with
the password that was provided. I can not figure out
how to do this, or even if its possible to do this.
Here's a snippet of my code
ByteArrayOutputStream outputStream = new
ByteArrayOutputStream();
// Initialize all the variables.
//
PdfReader reader = new
PdfReader(inputPDFFormByteArr);
// int permissions = reader.getPermissions();
// boolean strength = reader.is128Key();
PdfStamper stamper = new PdfStamper(reader,
outputStream);
FdfReader fdfReader = new FdfReader(fdfByteArr);
AcroFields form = stamper.getAcroFields();
form.setFields(fdfReader);
// stamper.setEncryption( strength, null, null,
permissions );
stamper.close();
If I use setEncryption, I do get "password security",
but the password is not what was provided in the
original document.
Any help is much appreciated.
Thanks,
Abhay.
-------------------------------------------------------
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