BCL Technologies

A PDFTron Company

we know PDF ..... inside and out


Processing PDF in C++


  • PDF page manipulation features, such as Merging, Splitting, Rotating, Deleting, Extracting, Optimizing.
  • PDF bookmarking features, such as appending and deleting bookmarks from existing PDF.
  • Embed elements inside current PDF, such as note, text, hyperlink, file attachment, custom annotation.
  • Get PDF information, such as metadata, page size, rotation, count, version.
  • Modify PDF security settings, such as getting signature information, checking encryption, changing password.
  • Extract text from PDF.

Sample Projects

Code Snippets

  • Read the PDFProcessor Object Specification
    This object lets you do post-processing of existing PDF files (such as merging multiple PDF files into one, splitting one PDF file into two, and encrypting/decrypting a PDF file)

Merging PDF Files

EasyPDFProcessor::IPDFProcessorPtr oProcessor;
// merge two files using Merge
oProcessor->Merge("C:\\input1.pdf", "C:\\input2.pdf", "C:\\merged.pdf");
// merge more than two files using MergeBatch  
bound.lLbound = 0;
bound.cElements = 3;
SAFEARRAY *inputFiles = SafeArrayCreate(VT_VARIANT, 1, &bound);
std::string filesToMerge[] = { "C:\\input1.pdf", "C:\\input2.pdf", "C:\\input3.pdf" };
int numFiles = sizeof(filesToMerge) / sizeof(std::string);
_variant_t var;
_variant_t inputArray;
char *file;
_bstr_t str;
long ix;
var.vt = VT_BSTR;
for (int i = 0; i < numFiles; i++)
    ix = i;
    file = const_cast<char *>(filesToMerge[i].c_str());
    str = file;
    var.bstrVal = str;
    SafeArrayPutElement(inputFiles, &ix, &var);          
inputArray.vt = VT_ARRAY|VT_VARIANT;
inputArray.parray = inputFiles;
oProcessor->MergeBatch(inputArray, "C:\\merged.pdf");

Splitting PDF

EasyPDFProcessor::IPDFProcessorPtr oProcessor;
// split the document at page 3
oProcessor->Split("C:\\input.pdf", "C:\\part1.pdf", "C:\\part2.pdf", 3);

Extracting Text from PDF

EasyPDFProcessor::IPDFProcessorPtr oProcessor;
// extract text from pages 1 through 4 to a physical file using ExtractText
oProcessor->ExtractText("C:\\input.pdf", "C:\\extracted.txt", NULL, 0, 3, NULL, NULL);
// extract text from a bounding box on page 1 to a string variable using ExtractText2
std::string text = oProcessor->ExtractText2("C:\\input.pdf", 0, 0, 0, 300, 300, NULL);

Request Pricing

Comprehensive PDF Features

C++ Sample Projects

Download C++ Sample Projects


Testimonials from Our Customers

We use easyPDF SDK technology for PDF conversion and it works very well. We knew BCL is a solid company. We have also looked at several competitors and tried to use their products, but we like easy PDF SDK the best. When we talked to BCL Technologies’ design engineering team, we knew they had the knowledge and confidence to solve our problems.” Read the case study

We evaluated many PDF tools and drivers. We even wrote our own. Except for BCL’s easyPDF SDK, all had limitations we couldn’t live with. Some only converted from MS Office and not very well. Others could not do annotation or text stamping on PDF documents. None were as easy to use and as easy to integrate.” Read the case study

© 1993 - , BCL Technologies.

All other trademarks are the property of their respective owners.