Opening PDF with Security

Opening PDF with Security

Forum member · Jan 5, 2006
I create my PDF documents using DynamicPDF generator 3.0 and add standard security to the documents. I'm now trying to open the documents with Dynamic Merger 3.0 to join and watermark them. Every time I attempt to open a document that I applied security to, I get the following error: "Document can not be decrypted. Invalid owner password." This error occurs when I call: MergeDocument tmp_Document = new MergeDocument(FileName); Is there a way to assign the password prior to opening the document?

Re: Opening PDF with Security

Support · Jan 5, 2006
Hello, If you want to merge an encrypted PDF, it can be done using the PdfDocument object. There is an overloaded PdfDocument object constructor which accepts password for encrypted PDFs. Following is the code snippet: PdfDocument pdf_Document = new PdfDocument(FileName, password); MergeDocument tmp_Document = new MergeDocument(pdf_Document); Thanks, ceTe Software Support Team