Hi,
 
I am using iTextSharp.dll in my windows application, with iTextSharp i am 
password protecting the PDF file, its working fine for files less than 20,000kb.
But when i am trying to password protect large files is above 20,000kb its 
throughing an exception as "PdfReader not opened with owner password".
 
Code:
Stream input = new FileStream("C:\\Disco_Images\\Radiologies\\atharlarge.pdf", 
FileMode.Open);

Stream output = new 
FileStream("C:\\Disco_Images\\Radiologies\\atharlarge_enc.pdf", 
FileMode.Create);

PdfReader reader = new PdfReader(input);

PdfEncryptor.Encrypt(reader, output, true, "secret", "secret", 
PdfWriter.ALLOW_PRINTING);

Please help me from this.
 
Thanks in advance,
 
Regards,
Mohammed Athar
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to