Hi,

We are using I-Text Sharp,and we are using that for unprotecting pdf files 
using PDFReader and PDFEncrypt.Encrypt(params).

We are supplying right password for pdf but still it is unable to open and 
throwing exception like "PDF Reader can't be opened using owner password".

And for this files we are getting IsOpenedWithFullPermissions to false.

Here is sample code that we are using.

PDFReader preader=null;

byte[] pwdb = enc.GetBytes(password);
preader = new PdfReader(fileName, pwdb);
fileStream = new FileStream(unlockedPDFName, FileMode.Create);
if (preader.PdfVersion == 10)
{
                    Constants.WriteToErrorLog(this.GetType().ToString());
                    Constants.WriteToErrorLog("Not Support For Adobe Version 
10.");
}
else
{

                    PdfEncryptor.Encrypt(preader,fileStream, true, null, 
password, PdfWriter.AllowAssembly | PdfWriter.AllowCopy | 
PdfWriter.AllowDegradedPrinting | PdfWriter.AllowFillIn | 
PdfWriter.AllowModifyAnnotations | PdfWriter.AllowModifyContents | 
PdfWriter.AllowPrinting | PdfWriter.AllowScreenReaders);
                    preader.Close();
}




Kindly help us to resolve same.

Thanks & Regards ,
Naitik Jani | Processing Developer
Capital Novus
Driving Efficiency Through Expert Innovation
A-501,MindSpace, Building No : 1A,
Aqualine Properties Pvt. Ltd.- IT/ITes SEZ,
Koba, Gandhinagar-382009
Office  703.261.6010 |Mobile 84015.83077
[email protected] |  www.capitalnovus.com<http://www.capitalnovus.com/>
Washington DC | New York | Chicago | Houston | Paris | India | Tokyo

Capital Legal Solutions, LLC d/b/a Capital Novus is not authorized to practice 
law or provide legal services, and the services offered by the company are 
limited to the non-legal, administrative aspects of document review and 
discovery projects.  The information contained in this email message may be 
confidential or legally privileged.  If you are not the intended recipient, 
please advise the sender by replying to this email or immediately calling 
Capital Legal Solutions, LLC, and delete all copies of this message and any 
attachments.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
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