简体   繁体   中英

Merging signed pdf with other pdfs

I am currently using itextsharp dll to merge pdfs documents into one document. The problem is itextsharp skips any pdfs that are digitally signed and copy not allowed pdfs during merge.

Is there any other paid or free libraries that can merge signed pdfs with non signed into a single pdf document?

Thanks, Developer.

You can merge signed and non signed documents using Docotic.Pdf library .

Here is a sample that shows how to merge two PDF documents:

public static void MergeFiles(string output, params string[] inputFiles)
{
    using (PdfDocument doc = new PdfDocument())
    {
        foreach (string file in inputFiles)
            doc.Append(file);

        // delete the first (automatically inserted) page
        doc.RemovePage(0);

        doc.Save(output);

        System.Diagnostics.Process.Start(output);
    }
}

The library will merge bookmarks, form fields, annotations etc. But please note that digital signatures will be invalidated.

Disclaimer: I work for the vendor of the library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM