Tabula helps you liberate data tables trapped inside PDF files.
- Download from the official site
- Read more about Tabula on OpenNews Source
- See also: tabula-extractor, the extraction library that powers Tabula. Also provides an experimental command-line interface.
If you’ve ever tried to do anything with data provided to you in PDFs, you know how painful this is — you can’t easily copy-and-paste rows of data out of PDF files. Tabula allows you to extract that data in CSV format, through a simple web interface (Check out this short screencast)
Caveat: Tabula only works on text-based PDFs, not scanned documents. If you can click-and-drag to select text in your table in a PDF viewer (even if the output is disorganized trash), then your PDF is text-based and Tabula should work.
First, make sure you have a recent copy of Java installed. You can download Java here. Tabula requires a Java Runtime Environment compatible with Java 6 or Java 7. If you have a problem, check Known Issues first, then report an issue.
tabula-win.zipfrom the download site. Unzip the whole thing and open the
tabula.exefile inside. A browser should automatically open to http://127.0.0.1:8080/ . If not, open your web browser of choice and visit that link.
To close Tabula, just go back to the console window and press "Control-C" (as if to copy).
If you need Tabula to use a port other than 8080, set the
tabula-mac.zipfrom the download site. Unzip and open the Tabula app inside. A browser should automatically open to http://127.0.0.1:8080/ . If not, open your web browser of choice and visit that link.
To close Tabula, find the Tabula icon in your dock, right-click (or control-click) on it, and press "Quit".
Note: If you’re running Mac OS X 10.8 or later, you might get an error like "Tabula is damaged and can't be opened." We're working on fixing this, but click here for a workaround.
tabula-jar.zipfrom the download site and unzip it to the directory of your choice. Open a terminal window, and
cdto inside the
tabuladirectory you just unzipped. Then run:
java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -jar tabula.jar
Tabula binds to port 8080 by default. You can change it with the
java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -Djetty.port=9999 -jar tabula.jar
If the program fails to run, double-check that you have Java installed and then try again.
There are some bugs that we're aware of that we haven't managed to fix yet. If there's not a solution here or you need more help, please go ahead and report an issue.
see this GateKeeper page for more information.: If you’re running Mac OS X 10.8 or later, GateKeeper may prevent you from opening the Tabula app. Please
- Right-click on Tabula.app and select Open from the context menu.
- The system will tell you that the application is "from an unidentified developer" and ask you whether you want to open it. Click Open to allow the application to run. The system remembers this choice and won't prompt you again.
(If you continue to have issues, double-check the OS X GateKeeper documentation for more information.)
(All platforms): This error means that the area you selected didn't contain any text or a table that Tabula can understand. You probably have an image-based PDF (or a text-based PDF containing an image of a table). We'll fix the error on the next release, but Tabula won't be able to extract any data from image-based PDFs at any point in the near future. (Though you can try OCRing the PDF.)
(Windows): Your Windows computer expects a type of encoding other than Unicode or Windows's English encoding. You can fix this by entering a few simple commands in the Command Prompt. (The commands won't affect anything besides Tabula.)
- Open a Command Prompt
cdand then the path to the directory that contains
- Change that terminal's codepage to Unicode by typing:
- Run Tabula by typing
Running Tabula from source (for developers)
Download JRuby. You can install it from its website, or using tools like
Download Tabula and install the Ruby dependencies. (Note: if using
rbenv, ensure that JRuby is being used.
git clone git://github.com/jazzido/tabula.git cd tabula gem install bundler gem install tabula-extractor bundle install
Then, start the development server:
bundle exec rackup
(If you get encoding errors, set the
JAVA_OPTS environment variable to
The site instance should now be viewable at http://127.0.0.1:9292/ .
You can a couple some options when executing the server in this manner:
TABULA_DATA_DIR="/tmp/tabula" \ TABULA_DEBUG=1 \ bundle exec rackup
TABULA_DATA_DIRcontrols where uploaded data for Tabula is stored. By default, data is stored in the OS-dependent application data directory for the current user. (similar to:
~/Library/Application Support/Tabulaon Mac,
TABULA_DEBUGprints out extra status data when PDF files are being processed. (
Alternatively, running the server as a JAR file
Testing in this manner will be closer to testing the "packaged application" version of the app.
bundle exec rake war java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -jar build/tabula.jar
Building a packaged application version
After performing the above steps ("Running Tabula from source"), you can compile Tabula into a standalone application:
Mac OS X
If you wish to share Tabula with other machines, you will need a codesigning certificate. Our distribution of Tabula uses a self-signed certificate, as noted above. See this section of build.xml for details. If you will only be running Tabula on the machine you are building it on, you may remove this entire block (lines 44-53).
To compile the app:
This will result in a portable "tabula_mac.zip" archive (inside the
for Mac OS X users.
You can build .exe files for the Windows target on any platform.
Download a 3.1.X (beta) copy of Launch4J.
Unzip it into the Tabula repo so that "launch4j" (with subdirectories "bin", etc.) is in the repository root.
This will result in a portable "tabula_win.zip" archive (inside the
for Mac OS X users.
If you have issues, you can try building manually. (These commands are for OS X/Linux and may need to be adjusted for Windows users.)
# (from the root directory of the repo) rake war cd launch4j ant -f ../build.xml windows
A "tabula.exe" file will be generated in "build/windows". To run, the exe file needs "tabula.jar" (contained in "build") in the same directory. You can create a .zip archive by doing:
# (from the root directory of the repo) cd build/windows mkdir tabula cp tabula.exe ./tabula/ cp ../tabula.jar ./tabula/ zip -r9 tabula_win.zip tabula rm -fr tabula
Interested in helping out? We'd love to have your help!
You can help by: