PHPackages                             rhysleesltd/laravel-camelot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. rhysleesltd/laravel-camelot

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

rhysleesltd/laravel-camelot
===========================

PHP Wrapper library for interfacing with the Camelot PDF table extraction library built in Python

v0.1(3mo ago)0104↓33.3%1MITPHPPHP ^8.1|^8.2|^8.3|^8.4|^8.5

Since Jan 31Pushed 3mo agoCompare

[ Source](https://github.com/RhysLeesLtd/laravel-camelot)[ Packagist](https://packagist.org/packages/rhysleesltd/laravel-camelot)[ RSS](/packages/rhysleesltd-laravel-camelot/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

rhysleesltd/laravel-camelot
===========================

[](#rhysleesltdlaravel-camelot)

A **Laravel wrapper** for [Camelot](https://github.com/camelot-dev/camelot)—the Python PDF table extraction library. Extract tabular data from PDFs in your Laravel app using the same API as the Camelot CLI, with Laravel helpers (e.g. `Arr::`, `Collection::`) and auto-discovered service provider.

Installation
------------

[](#installation)

You need both the PHP package and the Python Camelot library (this package calls the Camelot CLI under the hood).

### 1. PHP package (Laravel)

[](#1-php-package-laravel)

```
composer require rhysleesltd/laravel-camelot
```

The `CamelotServiceProvider` is auto-discovered; no manual registration is required.

### 2. Python Camelot

[](#2-python-camelot)

Install Camelot so the `camelot` command is available on your system path. Full details: [Camelot installation docs](https://camelot-py.readthedocs.io/en/master/user/install.html).

#### Linux (Ubuntu / Debian)

[](#linux-ubuntu--debian)

```
# Optional: Ghostscript (only if you need a backend other than pdfium)
sudo apt install ghostscript

# Install Camelot (pdfium is the default backend as of v1.0.0)
pip install "camelot-py[base]"
```

Or with conda: `conda install -c conda-forge camelot-py`.

#### macOS

[](#macos)

```
# Optional: Ghostscript (only if you need a backend other than pdfium)
brew install ghostscript

# Install Camelot
pip install "camelot-py[base]"
```

If the Ghostscript library is not found, you may need to symlink it (see the [Camelot dependency docs](https://camelot-py.readthedocs.io/en/master/user/install-deps.html)).

#### Windows

[](#windows)

```
pip install "camelot-py[base]"
```

For optional Ghostscript, use the [Ghostscript Windows installer](https://www.ghostscript.com/download/gsdnld.html). For Tkinter (e.g. for plot), you may need [ActiveTcl](https://www.activestate.com/activetcl/downloads). See [Camelot dependencies](https://camelot-py.readthedocs.io/en/master/user/install-deps.html) for details.

---

Verify the CLI works: `camelot --help`

Usage
-----

[](#usage)

The package adheres closely with the camelot CLI API Usage. Default output is in CSV format as a simple string. If you need to parse CSV strings we recommend the `league/csv` package ()

```
