Skip to content
Advertisement

How can tabula (JAR) be called from Java?

Tabula looks like a great tool for extracting tabular data from PDFs. There are plenty of examples of how to call it from the command line or use it in Python but there doesn’t seem to be any documentation for use in Java. Does anyone have a worked example?

Note, tabula does provide source code but it seems confused between versions. For example, the example on GitHub references a TableExtractor class which does not seem to exist in the JAR.

https://github.com/tabulapdf/tabula-java

Advertisement

Answer

you can use the following code to call tabula from java, hope this helps

JavaScript
Advertisement