ByteScout PDF Suite - C# - Split Protected PDF Document with PDF Extractor SDK - ByteScout

ByteScout PDF Suite – C# – Split Protected PDF Document with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Split Protected PDF Document with PDF Extractor SDK

How to split protected PDF document with PDF extractor SDK in C# using ByteScout PDF Suite

Step-by-step tutorial on how to split protected PDF document with PDF extractor SDK in C#

The sample source code below will teach you how to split protected PDF document with PDF extractor SDK in C#. ByteScout PDF Suite: the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can split protected PDF document with PDF extractor SDK in C#.

The SDK samples given below describe how to quickly make your application do split protected PDF document with PDF extractor SDK in C# with the help of ByteScout PDF Suite. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. Check C# sample code samples to see if they respond to your needs and requirements for the project.

Trial version of ByteScout PDF Suite 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
      
// // This example demonstrates how to provide password for protected PDF files. // using System; using System.IO; using Bytescout.PDFExtractor; namespace SplittingExample { class Program { static void Main(string[] args) { string inputFile = @".\encrypted (password is 'password').pdf"; using (DocumentSplitter splitter = new DocumentSplitter("demo", "demo")) { // Handle `PasswordRequired` event splitter.PasswordRequired += new PasswordEventHandler(splitter_PasswordRequired); // Ignore document permissions splitter.CheckPermissions = false; // Split document splitter.Split(inputFile, "part1.pdf", @"part2.pdf", 3); } Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } static void splitter_PasswordRequired(object sender, string document, ref string password) { // Ask user for password and put it to `Password` property. password = "password"; } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite 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 Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next