Convert a PDF to Text Using LabVIEW

Updated Feb 10, 2026

Reported In

Software

  • LabVIEW

Issue Details

I need to extract the text from a PDF file and use it in LabVIEW, how can I accomplish this?

Solution

The Apache Foundation created a Java library that can extract the text from a PDF file, among other things, called PDFBox. You can download the latest version of PDFBox Command Line tool to call it within LabVIEW using the System Exec.vi. VI snippet that uses the PDFBox Command Line Tool is attached at the bottom of this article. To use it, simply browse to the PDFBox-app-x.x.x.jar file in the "Path to .jar" control, and browse to the PDF file you wish to convert to text in the "Path to PDF". A text file will be generated with the filename and text contents of the PDF file 

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
 
Note: Java Development Kit (JDK) must be installed to use this Java library

Additional Information

The PDFBox Command Line Tool provides many commands to interact with PDF files in addition to the convert utility. Consult the documentation section of the PDFBox Command Line Tool to learn how to use the commands.