1. Go to this page and download the library: Download randomstate/camelot-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
randomstate / camelot-php example snippets
use RandomState\Camelot\Camelot;
use League\Csv\Reader;
$tables = Camelot::lattice('/path/to/my/file.pdf')
->extract();
$csv = Reader::createFromString($tables[0]);
$allRecords = $csv->getRecords();
$camelot->extract(); // uses temporary files and automatically grabs the table contents for you from each
$camelot->save('/path/to/my-file.csv'); // mirrors the behaviour of Camelot and saves files in the format /path/to/my-file-page-*-table-*.csv
$camelot->plot(); // useful for debugging, it will plot it in a separate window (see Visual Debugging below)