Convert a PDF to Text Using LabVIEW

Updated Apr 28, 2020

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. An example VI that uses the PDFBox Command Line Tool is attached on 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, browse to the PDF file you wish to convert to text in the "Path to PDF" and browse to the path where you want to create the text file in the "Text file path" control.

Additional Information

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