We regularly create and update our sample code library so you may quickly learn compare PDF documents with PDF extractor SDK and the step-by-step process in C++. ByteScout Data Extraction Suite was created to assist compare PDF documents with PDF extractor SDK in C++. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.
Save time on writing and testing code by using the code below and use it in your application. If you want to know how it works, then this C++ sample code should be copied and pasted into your application’s code editor. Then just compile and run it. C++ application implementation mostly involves various stages of the software development so even if the functionality works please check it with your data and the production environment.
ByteScout Data Extraction Suite free trial version is available for download from our website. Free trial also includes programming tutorials along with source code samples.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
#include "stdafx.h" #include "comip.h" #import "c:\\Program Files\\Bytescout PDF Extractor SDK\\net4.00\\Bytescout.PDFExtractor.tlb" raw_interfaces_only using namespace Bytescout_PDFExtractor; int _tmain(int argc, _TCHAR* argv[]) { // Initialize COM. HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); // Load first document _TextExtractorPtr document1(__uuidof(TextExtractor)); document1->put_RegistrationName(_bstr_t(L"DEMO")); document1->put_RegistrationKey(_bstr_t(L"DEMO")); document1->LoadDocumentFromFile(_bstr_t(L"..\\..\\comparison1.pdf")); // Load second document _TextExtractorPtr document2(__uuidof(TextExtractor)); document2->put_RegistrationName(_bstr_t(L"DEMO")); document2->put_RegistrationKey(_bstr_t(L"DEMO")); document2->LoadDocumentFromFile(_bstr_t(L"..\\..\\comparison2.pdf")); // Compare documents _TextComparerPtr comparer(__uuidof(TextComparer)); comparer->put_RegistrationName(_bstr_t(L"DEMO")); comparer->put_RegistrationKey(_bstr_t(L"DEMO")); DECIMAL result; comparer->Compare((_BaseTextExtractorPtr) document1, (_BaseTextExtractorPtr) document2, &result); // Generate report VARIANT_BOOL ok; comparer->GenerateHtmlReport_2(_bstr_t(L"report.html"), &ok); document1->Release(); document2->Release(); comparer->Release(); CoUninitialize(); return 0; }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
// stdafx.cpp : source file that includes just the standard includes // CPPExample.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> // TODO: reference additional headers your program requires here
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
#pragma once // Including SDKDDKVer.h defines the highest available Windows platform. // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. #include <SDKDDKVer.h>
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: