Example Code

Extract PDF Text and Search using PDF-Box

Code and Documents



This example VI demonstrates the use of functions in .NET pallete to extract or search for string in any PDF file.



This is a fairly simple example for those who just want to extract and search the text of a PDF. It uses some third party software found at the following link:


Special thanks to Dan Letecky for providing his .NET examples upon which this is based. See the link followed for his article which allowed this to exist:




  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open the VI " PDF Text Extractor.vi"..
  2. Choose a file path and input a string. In the bottom half of the screen, you can play your "new sound," save it, or stop the program. The table lists all the signal types that have been added to it.
  3. Run the VI.


Additional Information or References
VI Block Diagram


Block Diagram.png


 **This document has been updated to meet the current required format for the NI Code Exchange.**


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.


Thanks for this. I will be using it to automate some data extraction.

If you receive this error: "An error occurred trying to load the assembly."

Try the following: In Windows 7 or later, you also can right-click the assembly and click Unblock on the General tab to grant an assembly full trust. I found this here.