PHPackages                             rekalogika/gotenberg-pdf-bundle - 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. rekalogika/gotenberg-pdf-bundle

ActiveSymfony-bundle[PDF &amp; Document Generation](/categories/documents)

rekalogika/gotenberg-pdf-bundle
===============================

Symfony Bundle for generating PDF using Gotenberg API

1.3.0(1y ago)118.8k↓49.6%1MITPHP

Since Oct 17Pushed 1y ago2 watchersCompare

[ Source](https://github.com/rekalogika/gotenberg-pdf-bundle)[ Packagist](https://packagist.org/packages/rekalogika/gotenberg-pdf-bundle)[ Docs](https://rekalogika.dev/gotenberg-pdf-bundle)[ GitHub Sponsors](https://github.com/priyadi)[ RSS](/packages/rekalogika-gotenberg-pdf-bundle/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (8)Versions (8)Used By (0)

rekalogika/gotenberg-pdf-bundle
===============================

[](#rekalogikagotenberg-pdf-bundle)

Symfony Bundle for generating PDF using Gotenberg.

Features
--------

[](#features)

- Easy provisioning with Symfony Flex, Symfony CLI, and Docker Compose. Just install the bundle and you're ready to generate your first PDF.
- Separated high-level interfaces in `rekalogika/print-contracts`. If Gotenberg gets out of fashion in the future, hopefully we only need to replace this package, and don't need to change our code.
- Abstractions for paper sizes and page layouts.
- Leverages Symfony HTTP Client. See the requests and responses in Symfony profiler for debugging.
- With the heavy lifting already done by Gotenberg, there is no need to deal with Chrome instances, CLI tools, Puppeteer, NodeJS, etc.
- Scalable architecture. Suitable for low-volume development and high-volume usage alike. No need to reengineer if your usage outgrows your solution. Just add more instances of Gotenberg with Docker Compose or the container orchestration tool you are using.

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

[](#installation)

Preinstallation checklists:

- Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation. Run `composer about` to verify.
- Make sure your project has Symfony Flex installed and enabled (it is enabled by default). Run `composer why symfony/flex` to verify.

Open a command console, enter your project directory, and execute:

```
composer config extra.symfony.allow-contrib true
composer require rekalogika/gotenberg-pdf-bundle
```

Quick Start
-----------

[](#quick-start)

Checklist:

- Make sure you have Docker Compose installed. Run `docker compose version` to verify.
- Make sure you have Symfony CLI installed. Run `symfony version` to verify.

To start the Gotenberg server (and other services registered in the Docker Compose configuration), run:

```
docker compose up -d
```

Then start the web server using Symfony CLI:

```
symfony serve
```

Create a sample controller for generating a PDF file:

```
namespace App\Controller;

use Rekalogika\Contracts\Print\PageOrientation;
use Rekalogika\Contracts\Print\PdfGeneratorInterface;
use Rekalogika\Print\PageLayout;
use Rekalogika\Print\Paper;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Routing\Annotation\Route;

class AppController extends AbstractController
{
    #[Route('/pdf')]
    public function index(PdfGeneratorInterface $pdfGenerator): Response
    {
        $pdf = $pdfGenerator->generatePdfFromHtml(
            htmlContent: 'Hello World',
            paper: Paper::A4(),
            pageLayout: PageLayout::inMm(PageOrientation::Portrait, 30)
        );

        return new StreamedResponse(
            callback: fn () => fpassthru($pdf->detach()),
            status: 200,
            headers: [
                'Content-Type' => 'application/pdf',
            ]
        );
    }
}
```

Then open your browser and go to .

Documentation
-------------

[](#documentation)

[rekalogika/gotenberg-pdf-bundle](https://rekalogika.dev/gotenberg-pdf-bundle)

License
-------

[](#license)

MIT

Contributing
------------

[](#contributing)

The `rekalogika/gotenberg-pdf-bundle` repository is a read-only repo split from the main repo. Issues and pull requests should be submitted to the [rekalogika/print-src](https://github.com/rekalogika/print-src) monorepo.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~56 days

Recently: every ~83 days

Total

7

Last Release

655d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1102197?v=4)[Priyadi Iman Nurcahyo](/maintainers/priyadi)[@priyadi](https://github.com/priyadi)

---

Top Contributors

[![priyadi](https://avatars.githubusercontent.com/u/1102197?v=4)](https://github.com/priyadi "priyadi (17 commits)")

---

Tags

bundlegotenbergmarginpaperpdfprintsymfonysymfony-bundlepdfprintpapermargin

### Embed Badge

![Health badge](/badges/rekalogika-gotenberg-pdf-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/rekalogika-gotenberg-pdf-bundle/health.svg)](https://phpackages.com/packages/rekalogika-gotenberg-pdf-bundle)
```

###  Alternatives

[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

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