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)117.7k↓22.7%MITPHP

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 1mo 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

33

—

LowBetter than 75% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

610d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13d0eed333cf2f0d552e9a4d0ca1c6a8fc0be0506bbc5e7516f6985b17b86043?d=identicon)[priyadi](/maintainers/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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3685.2M19](/packages/gotenberg-gotenberg-php)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

210210.4k2](/packages/sensiolabs-gotenberg-bundle)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)[padam87/rasterize-bundle

HTML to PDF Symfony bundle. Works with Puppeteer, PhantomJS, and more.

1579.4k](/packages/padam87-rasterize-bundle)[nucleos/dompdf-bundle

This bundle provides a wrapper for using dompdf inside symfony.

54882.8k1](/packages/nucleos-dompdf-bundle)

PHPackages © 2026

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