Pichtchikov, Alexandre schreef op 5/06/2014 16:25:
>
> Hello,
>
> I have tagged pdf. All tags removed from document when I encrypt it 
> using code below.
>
> Is it a way to encrypt document and keep all tags in it?
>

This works for me:
         PdfReader reader = new PdfReader(src);
         PdfStamper stamper = new PdfStamper(reader, new 
FileOutputStream(dest));
         stamper.setEncryption("hello".getBytes(), "world".getBytes(), 
0, true);
         stamper.close();
         reader.close();

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to