Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Jan 03, 2018 10:25 pm

Hi,

I'm using SpirePDF to merge pdfs together into a single document, however, some documents that are sent to me have security on them. I am able to open the secured documents, so its not password security, but when trying to load/merge them in Spire I get Unable to decrypt document without ID.

Is there any way around getting secured documents to merge with the others? Or is it necessary to use a password, as when I'm sent these documents, they won't come with any associated passwords, the security seems to be in place only to prevent altering the PDF, so I assumed merging them should work as we're not changing anything.

raijinakruo
 
Posts: 5
Joined: Mon Oct 16, 2017 2:04 pm

Thu Jan 04, 2018 3:03 am

Hello,

Thanks for your inquiry. To help us reproduce the issue, please share us with the documents that have security and the code you are using. You could send them to our email([email protected]). We promise to keep them confidential and won't use it for any other purpose.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Fri Jan 05, 2018 10:57 am

I can't seem to create a test file myself and the document I have contains confidential info.

The PDF document has a 40-bit RC4 encryption which I believe is causing the issue.

I've tested and identified that Spire PDF works fine with 128-bit AES encryption with all security as not allowed, so it must be the encryption level. Is that of any help? If I can get a test file with that encryption I will post it here, using the simple code below to test.

Code: Select all
            String[] files = new String[] { @"C:\Dev\Visual Studio 2015\Projects\SPIRETEST\SPIRETEST\bin\Debug\PDFFiles\TestFileSecure.pdf", @"C:\Dev\Visual Studio 2015\Projects\SPIRETEST\SPIRETEST\bin\Debug\PDFFiles\TestFileUnsecure.pdf" };
            string outputFile = @"C:\Dev\Visual Studio 2015\Projects\SPIRETEST\SPIRETEST\bin\Debug\PDFFiles\mergedPDFs.pdf";
            PdfDocumentBase doc = PdfDocument.MergeFiles(files);
            doc.Save(outputFile, FileFormat.PDF);

raijinakruo
 
Posts: 5
Joined: Mon Oct 16, 2017 2:04 pm

Mon Jan 08, 2018 3:39 am

Hello,

Thanks for your feedback. It works well while merging the PDF with 40-bit RC4 encryption on my side. The below screenshot shows the detail encryption information of my test PDF. Please tell us the difference between yours or send the same screenshot of your PDF to us. In addition, it will be helpful if you could share your documents, you could remove the confidential information.
001.png


Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Thu Jan 11, 2018 11:52 am

Hi,

Following what you said I removed the personal info and then it started working. I think its something do with the digital signature as if I fill & sign the document it starts working also.

raijinakruo
 
Posts: 5
Joined: Mon Oct 16, 2017 2:04 pm

Fri Jan 12, 2018 1:39 am

Hello,

Thanks for your feedback. If you encounter any other query, please feel free to contact us.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.PDF

cron