Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, March 20, 2019 9:39:49 AM(UTC)
Josh Clark

Groups: Registered, Tech Support, Administrators
Posts: 54

Thanks: 2 times
Was thanked: 10 time(s) in 10 post(s)

Parsing a PDF document is currently unavailable in our CDLL toolkit. However, we do offer this functionality through .NET using the PDFDocument.ParsePages() method. The solution below contains two projects. The first is a .NET library that parses the objects contained within a PDF document and writes the details of these objects to a given filename. This project compiles to a DLL and must be registered to create a C compatible TLB file.The second C++ application imports the TLB file and provides the filenames for both the PDF document and the text output document and calls the appropriate method from the first project. This project was originally written using version 18 (posted here), and I have updated it to use our version 20 toolkit and Visual Studio 2017, although Visual Studio 2015 is also supported.

You can run this project by following these steps:
  1. Download the attached zip file and extract the project
  2. Open the solution file using Visual Studio
  3. Build the solution (all that is necessary is the CustomDLL project)
    1. This assumes that you have installed the version 20 toolkit at "C:\LEADTOOLS 20". You will have to adjust the references otherwise.
    2. This also assumes your license files are located at "C:\LEADTOOLS 20\Support\Common\License", the default location for version 20. If elsewhere, you can adjust the filepath on line 34 of Class1.cs accordingly.
  4. Register the output CustomDLL.dll to be used in the PDFDocument project.
    1. Run the Visual Studio command prompt found under the Start Menu>Visual Studio
      1. For building to 32 bit, use the "x86 Native Tools Command Prompt for VS2017"
      2. For building to 64 bit, use the "x64 Native Tools Command Prompt for VS2017"
    2. Navigate to the output directory of the CustomDLL project (ie PDFDocument\CustomDLL\bin\x86)
    3. Execute the following command: RegAsm.exe CustomDLL.dll /tlb:CustomDLL.tlb /codebase
      1. To explicitly call the 32 bit RegAsm.exe, you can reference C:\Windows\Microsoft.NET\Framework\<Framework version>\RegAsm.exe
      2. To explicitly call the 64 bit RegAsm.exe, you can reference C:\Windows\Microsoft.NET\Framework64\<Framework version>\RegAsm.exe
  5. Adjust the filenames for PDFFileName and TXTFileName if you prefer
  6. Rebuild the solution (All that is necessary is the PDFDocument project)
  7. Run the application. This will create a text file in the C:\temp directory if you have not changed the TXTFileName variable


You can download this application here:
File Attachment(s):
PDFDocument.zip (8kb) downloaded 59 time(s).
Josh Clark
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.055 seconds.