This functionality is only available in our .NET classes using PDFDocument.ParsePages() Method, and there is no direct way to do it using the C DLL functions.
The attached solution shows how to be able to parse objects from PDF files and save the results to a TXT file using our .NET DLLs in C++ application. The solution contains two projects:
1) CustomDLL project: C# DLL that includes the implementation of the Parse objects.
2) PDFDocument Project: C++ Console Application that uses the CustomDLL to call the PDFDocument.ParsePages() Method.
In order to successfully run the solution, please do the following:
1. Download the attached ZIP file and extract it to your hard drive.
2. Open the solution using VS2010.
3. Build the two projects.
4. Copy the Leadtools.PdfEngine.dll next to the newly created CustomDLL.dll.
5. Register the Managed DLL for use with Native C++. You can do that as follows:
a. Run Visual Studio Command Prompt (2010). You can find it in Start Menu -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools.
b. Change the directory path of the directory that contains CustomDLL.dll.
c. Execute the below command:
RegAsm.exe CustomDLL.dll /tlb:CustomDLL.tlb /codebase
6. In the PDFDocument.cpp, change the PDFFileName and TXTFileName variables if needed.
7. Rebuild the solution and make sure there are no errors.
8. Run the solution, and it should open the folder that contains the generated TXT file if everything worked successfully.
If you face any problem using the above steps, send an email to
support@leadtools.com from a valid email address and mention this forum post, and include full details about the problem.
Note: This solution is also helpful to know how to use .NET methods in a C/C++ application.