The Solid Framework Core Model is our in-memory model of the reconstructed content of your PDF file. We reconstruct clean Unicode text, in reading order, and provide the bounds of the major text blocks as per their position in the original PDF layout.
Typically, we then export from this model to another format like Word .docx but this sample shows you how to iterate this model programmatically in-memory.
The sample outputs two files:
- a text file that includes the bounding box coordinates and text for each of the text blocks.
- an HTML file that visually illustrates the different bounding rectangles for all the text blocks/paragraphs in the PDF.
The source code and SDK for this sample is provided in the form of a zip file, the project file below and the Solid Framework C++ for Windows SDK zip file, available from the developer portal (self-service).
Steps to Extracting Text from Model – C++ Sample Application
- Download the TextBounding.zip (9KB)
- Extract the downloaded archive. This creates a TextBounding folder with the sample project and an empty SolidFramework folder. The Solid Framework SDK is not included in the sample.

- Create a free portal account and generate a Developer SDK license.
- Download the Solid Framework Native SDK and extract it into the TextBounding\SolidFramework folder. Check that this folder now contains the SolidFramework.cpp and SolidFramework.h files, and a folder with the correct bitness for your project: Win32 for x86 or Win64 for x64. The placeholder file that comes with the sample can be ignored.

- Open TextBounding.sln in Visual Studio.
- Right click on the project and select Rebuild.
- Open a cmd window and navigate to your project’s Debug folder where the .exe file of the project is. i.e cd C:\<path_from_extraction>\TextBounding\Debug (for an x64 build, cd C:\<path_from_extraction>\TextBounding\x64\Debug).
- Type in the name of your .exe file followed by the paths to the following files:
- Your license.xml file
- The pdf file to parse
- Path to where you want your .html file to be saved to
- Path where you want your .txt file to be saved to
i.e. TextBounding.exe C:\<path_from_extraction>\TextBounding\license.xml C:\<path_from_extraction>\TextBounding\YourPDF.pdf C:\<path_from_extraction>\TextBounding\layout.html C:\<path_from_extraction>\TextBounding\layout.txt
- Press Enter. You can then view the .html file which visually illustrates the reconstructed text blocks/paragraphs and their bounds.
