PHPackages                             deaniliev/laravel-docling - 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. deaniliev/laravel-docling

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

deaniliev/laravel-docling
=========================

Laravel package for the Docling Serve document conversion API

v1.0.0(today)01↑2900%MITPHPPHP ^8.2

Since Jul 31Pushed todayCompare

[ Source](https://github.com/deaniliev/laravel-docling)[ Packagist](https://packagist.org/packages/deaniliev/laravel-docling)[ RSS](/packages/deaniliev-laravel-docling/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (2)Used By (0)

Laravel Docling
===============

[](#laravel-docling)

Laravel package for the [Docling Serve](https://github.com/docling-project/docling-serve) document conversion API.

Convert PDFs, Office docs, HTML, images, and more to Markdown, JSON, HTML, or text from your Laravel app.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12
- A running [Docling Serve](https://docling-project.github.io/docling/usage/api_server/) instance

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

[](#installation)

```
composer require deaniliev/laravel-docling
```

Publish the config (optional):

```
php artisan vendor:publish --tag=docling-config
```

Configuration
-------------

[](#configuration)

Add these to your `.env`:

```
DOCLING_BASE_URL=http://localhost:5001
DOCLING_API_KEY=
DOCLING_TIMEOUT=120
DOCLING_POLL_INTERVAL=2
DOCLING_POLL_TIMEOUT=600
```

EnvDescriptionDefault`DOCLING_BASE_URL`Docling Serve base URL`http://localhost:5001``DOCLING_API_KEY`Sent as `X-Api-Key` when set`null``DOCLING_TIMEOUT`HTTP timeout (seconds)`120``DOCLING_POLL_INTERVAL`Async poll interval (seconds)`2``DOCLING_POLL_TIMEOUT`Max wait for async tasks (seconds)`600`Usage
-----

[](#usage)

Docling Serve **v1** expects a `sources` array (with `kind: http|file`). This package builds that payload for you.

### Convert from URL

[](#convert-from-url)

```
use Deaniliev\Docling\Facades\Docling;
use Deaniliev\Docling\ConvertOptions;

$result = Docling::convertFromUrl(
    'https://arxiv.org/pdf/2501.17887',
    ConvertOptions::make()->toFormats(['md'])->doOcr(true)
);

echo $result->markdown();
```

### Convert from local file

[](#convert-from-local-file)

```
$result = Docling::convertFromFile(
    storage_path('app/documents/report.pdf'),
    ConvertOptions::make()->toFormats(['md', 'json'])
);

echo $result->markdown();
$json = $result->json();
```

### Convert from base64

[](#convert-from-base64)

```
$result = Docling::convertFromBase64(
    base64_encode(file_get_contents($path)),
    'report.pdf',
    ConvertOptions::make()->toFormats(['md'])
);
```

### Asynchronous conversion

[](#asynchronous-conversion)

```
$task = Docling::convertFromUrlAsync('https://example.com/large.pdf');

// Poll until finished (throws on failure or timeout)
$task = Docling::waitForTask($task->taskId);

$result = Docling::result($task->taskId);

echo $result->markdown();
```

Or manage polling yourself:

```
$task = Docling::convertFromFileAsync('/path/to/doc.pdf');

while (! $task->isFinished()) {
    sleep(2);
    $task = Docling::poll($task->taskId);
}

if ($task->isSuccess()) {
    $result = Docling::result($task->taskId);
}
```

### Options

[](#options)

`ConvertOptions` covers common Docling options and accepts any extra fields via `with()`:

```
$options = ConvertOptions::make()
    ->fromFormats(['pdf'])
    ->toFormats(['md', 'json'])
    ->imageExportMode('embedded')
    ->doOcr(true)
    ->ocrLang(['en'])
    ->tableMode('accurate')
    ->pdfBackend('docling_parse')
    ->pipeline('standard')
    ->pageRange([1, 5])
    ->doPictureDescription(true)
    ->with(['vlm_pipeline_preset' => 'default']);
```

### Health check

[](#health-check)

```
$status = Docling::health();
```

### Without the Facade

[](#without-the-facade)

```
use Deaniliev\Docling\Docling;

$client = Docling::make(
    baseUrl: 'http://localhost:5001',
    apiKey: 'secret',
);

$result = $client->convertFromUrl('https://example.com/doc.pdf');
```

Testing
-------

[](#testing)

```
composer install
composer test
```

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19890364?v=4)[deanski](/maintainers/deanski)[@Deanski](https://github.com/Deanski)

---

Tags

laravelpdfconversiondocumentOCRdocling

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/deaniliev-laravel-docling/health.svg)

```
[![Health](https://phpackages.com/badges/deaniliev-laravel-docling/health.svg)](https://phpackages.com/packages/deaniliev-laravel-docling)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M350](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

78727.1M203](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58174.6k18](/packages/api-platform-laravel)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[rockett/weasyprint

A feature-rich WeasyPrint wrapper for generating PDFs from HTML and CSS, with support for PDF/A, PDF/UA, attachments, and optional Laravel integration.

29233.1k](/packages/rockett-weasyprint)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
