PHP code example of metolabs / camelot-php

1. Go to this page and download the library: Download metolabs/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/ */

    

metolabs / camelot-php example snippets


use MetoLabs\CamelotPHP\Camelot;

$camelot = Camelot::make('/path/to/file.pdf', 'lattice');

$result = $camelot->extract('array');

// Output example:
print_r($result['pages'][0]['tables'][1]);

$camelot->extract('string'); // returns JSON string
$camelot->extract('object'); // returns stdClass object

$camelot = Camelot::make('/file.pdf', 'stream', null, '/usr/local/bin/camelot', null, true);
bash
composer