ByteScout PDF Extractor SDK - C# - Merge Protected PDF Documents - ByteScout

ByteScout PDF Extractor SDK – C# – Merge Protected PDF Documents

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Merge Protected PDF Documents

How to merge protected PDF documents in C# using ByteScout PDF Extractor SDK

This code in C# shows how to merge protected PDF documents with this how to tutorial

The coding tutorials are designed to help you test the features without need to write your own code. ByteScout PDF Extractor SDK is the SDK that helps developers to extract data from unstructured documents, pdf, images, scanned and electronic forms. Includes AI functions like automatic table detection, automatic table extraction and restructuring, text recognition and text restoration from pdf and scanned documents. Includes PDF to CSV, PDF to XML, PDF to JSON, PDF to searchable PDF functions as well as methods for low level data extraction and you can use it to merge protected PDF documents with C#.

This code snippet below for ByteScout PDF Extractor SDK works best when you need to quickly merge protected PDF documents in your C# application. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Detailed tutorials and documentation are available along with installed ByteScout PDF Extractor SDK if you’d like to dive deeper into the topic and the details of the API.

Trial version of ByteScout PDF Extractor SDK is available for free. Source code samples are included to help you with your C# app.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System.Diagnostics; using Bytescout.PDFExtractor; namespace MergeDocuments { // // This example demonstrates how to provide password for protected PDF files. // class Program { static void Main(string[] args) { string[] inputFiles = new string[] { @".\encrypted1 (password is 'password').pdf", @".\encrypted2 (password is 'password').pdf", }; using (DocumentMerger merger = new DocumentMerger("demo", "demo")) { // Handle `PasswordRequired` event merger.PasswordRequired += new PasswordEventHandler(merger_PasswordRequired); // Ignore document permissions merger.CheckPermissions = false; merger.Merge(inputFiles, @".\result.pdf"); } // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("result.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } static void merger_PasswordRequired(object sender, string document, ref string password) { // Ask user for password and return it using `password` parameter password = "password"; } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next