janborg / symfony-tabula
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:lib
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-12-20 17:30:39 UTC
README
Intro
contao-tabula is a tool for liberating data tables trapped inside PDF files for the Laravel framework. This package was inspired by Python’s tabula-py package.
How to install
composer require janborg/contao-tabula
Configuration Settings (Java is needed)
[Windows]
http://www.oracle.com/technetwork/java/javase/downloads/index.html.
[MacOs]
brew update
brew cask install java
[Debian]
sudo apt install default-jre
[Fedora]
sudo dnf install java-latest-openjdk
How to use in Contao (Example)
$file = storage_path('app/public/pdf/test.pdf')
$tabula = new Tabula('/usr/bin/');
$tabula->setPdf($file)
->setOptions([
'format' => 'json',
'pages' => 'all',
'lattice' => true,
'stream' => true,
'outfile' => storage_path("app/public/csv/test.csv"),
])
->convert();
License
symfony-tabula is open-sourced software licensed under the MIT license.