hello, 

i am creating a PDF as follows:

PdfReader reader = new PdfReader("certificate.pdf");
ByteArrayOutputStream baos = new
ByteArrayOutputStream();
PdfStamper stamp = new PdfStamper(reader, baos);
AcroFields form = stamp.getAcroFields();
form.setfield("field1","ABC");
stamp.setFormFlattening(true);
stamp.close();
ServletOutputStream out = response.getOutputStream();
out.write(baos.toByteArray());
out.flush();

my question is, where do i put the following line to
encrypt my PDF file:

PdfEncryptor.encrypt(reader, baos,
PdfWriter.STRENGTH128BITS, null, null,
PdfWriter.AllowPrinting);

i have tried putting it before and after the
PdfStamper calls and each time when i try to call the
page it hangs my browser indefinitely (ie. just a
blank page and the execution never gets past the
encrypt() function).  and there are no errors being
output to the server logs or console at all...

thanks in advance for any help!


                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to