Hello,
I have a pdf document, that i am able to view the document in Adobe reader without entering any password. But has a security of: Password Security.
PDF merger is unable to merge that document.
Please advise
Password Security, unable to merge pdf documents
Re: Password Security, unable to merge pdf documents
Forum member · Jan 14, 2020I keep getting :"Document can not be decrypted. Invalid owner password.". But there is no password for this document, as i am able to view the PDF contents without having to enter a password.
Re: Password Security, unable to merge pdf documents
Support · Jan 15, 2020Hi,
Encrypted PDFs can have an ower and user password. If the user password is blank (""), it is possible to open an encrypted PDF without specifying a password. If you want to edit or merge an encrypted PDF though, you will need to specify the owner password. In order to work with an encrypted PDF in our product, you need to specify the owner password.
Thanks,
ceTe Software Support Team
Re: Password Security, unable to merge pdf documents
Forum member · Jan 15, 2020Thank you for the reply.
I have got the same feeling after doing some research, but business needed the proof that its not a bug in the DynamicPDF library and an issue that can't be resolved with any other PDF library unless owner password is removed.
Re: Password Security, unable to merge pdf documents
Forum member · Jan 15, 2020So Business is asking if there is a way to check if the pdf is encrypted with any kind of password and not merge them.
I will work on the merge part, but how to check if the pdf is encrypted or not?
What is the approach here?
Re: Password Security, unable to merge pdf documents
Support · Jan 15, 2020Hi,
You can check this by catching a PdfSecurityException as follows:
PdfDocument pdfDocument = null;
try
{
pdfDocument = new PdfDocument(@"source.pdf");
}
catch (PdfSecurityException ex)
{
pdfDocument = null;
// Handle security exception
}
MergeDocument document = new MergeDocument(pdfDocument);
Thanks,
ceTe Software Support Team
Re: Password Security, unable to merge pdf documents
Forum member · Jan 15, 2020Thank you for the quick reply!
Thank you for providing this quick way to check. Its neat.