ByteScout Data Extraction Suite - C++ - Merge Protected PDF Documents (C++ CLR) with PDF Extractor SDK - ByteScout

ByteScout Data Extraction Suite – C++ – Merge Protected PDF Documents (C++ CLR) with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – C++ – Merge Protected PDF Documents (C++ CLR) with PDF Extractor SDK

How to merge protected PDF documents (c++ clr) with PDF extractor SDK in C++ and ByteScout Data Extraction Suite

Step-by-step tutorial on how to merge protected PDF documents (c++ clr) with PDF extractor SDK in C++

The sample source codes on this page shows how to merge protected PDF documents (c++ clr) with PDF extractor SDK in C++. What is ByteScout Data Extraction Suite? It is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can help you to merge protected PDF documents (c++ clr) with PDF extractor SDK in your C++ application.

These C++ code samples for C++ guide developers to speed up coding of the application when using ByteScout Data Extraction Suite. Simply copy and paste in your C++ project or application you and then run your app! Enjoy writing a code with ready-to-use sample C++ codes.

You can download free trial version of ByteScout Data Extraction Suite from our website with this and other source code samples for C++.

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

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

CPPCLRConsoleApplication.cpp
      
#include "stdafx.h" // // This example demonstrates how to provide password for protected PDF files. // using namespace System; using Bytescout::PDFExtractor::DocumentMerger; // `PasswordRequired` event handler void OnPasswordRequired(System::Object ^sender, System::String ^document, System::String ^%password); int main(array<System::String ^> ^args) { String^ input1(".\\encrypted1 (password is 'password').pdf"); String^ input2(".\\encrypted2 (password is 'password').pdf"); String^ output(".\\result.pdf"); // Create DocumentMerger instance DocumentMerger^ merger = gcnew DocumentMerger("demo", "demo"); // Handle `PasswordRequired` event merger->PasswordRequired += gcnew Bytescout::PDFExtractor::PasswordEventHandler(&OnPasswordRequired); // Ignore document permissions merger->CheckPermissions = false; // Merge documents array<String^>^ files = gcnew array<String^>(2) { input1, input2 }; merger->Merge(files, output); delete merger; // Open the output document in default associated application (for demonstration) Diagnostics::Process::Start(output); return 0; } // `PasswordRequired` event handler void OnPasswordRequired(System::Object ^sender, System::String ^document, System::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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Resource.h
      
//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by app.rc

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

stdafx.cpp
      
#include "stdafx.h"

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

stdafx.h
      
#pragma once // TODO: reference additional headers your program requires here

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

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

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next