Hi,
We are working with Aspose.Pdf v7.7.0.0 and we have some issues to decrypt a pdf file (see attachment).
I try the following code and it worked well with some PDF :
try
{
PdfFileInfo fileInfo = new PdfFileInfo(documentToConvert);
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(documentToConvert);
// determine that source PDF file is Encrypted with password
if (fileInfo.IsEncrypted)
{
doc.Decrypt();
}
doc.Save("C:/Temp/newdoc.pdf");
}
catch (Exception)
{
}
But for some reasons, it don't work with some other PDF.
I got the following message when I try to open the file : "There was an error opening this document. There was a problem reading this document (109).
Someone as any hint for me ?
Thanks in advance
We are working with Aspose.Pdf v7.7.0.0 and we have some issues to decrypt a pdf file (see attachment).
I try the following code and it worked well with some PDF :
try
{
PdfFileInfo fileInfo = new PdfFileInfo(documentToConvert);
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(documentToConvert);
// determine that source PDF file is Encrypted with password
if (fileInfo.IsEncrypted)
{
doc.Decrypt();
}
doc.Save("C:/Temp/newdoc.pdf");
}
catch (Exception)
{
}
But for some reasons, it don't work with some other PDF.
I got the following message when I try to open the file : "There was an error opening this document. There was a problem reading this document (109).
Someone as any hint for me ?
Thanks in advance