PHPackages                             vivutio/pdf-scribe-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. vivutio/pdf-scribe-bundle

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

vivutio/pdf-scribe-bundle
=========================

Symfony 7/8 bundle for PDF generation using Chrome Headless

v0.1.0-alpha(3mo ago)027MITPHPPHP &gt;=8.2

Since Feb 1Pushed 3mo agoCompare

[ Source](https://github.com/vivutio/pdf-scribe-bundle)[ Packagist](https://packagist.org/packages/vivutio/pdf-scribe-bundle)[ RSS](/packages/vivutio-pdf-scribe-bundle/feed)WikiDiscussions main Synced 1mo ago

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

PDF Scribe Bundle
=================

[](#pdf-scribe-bundle)

[![Packagist Version](https://camo.githubusercontent.com/dd6ad6c8c22e542f427235ddb15296dee434180df414bd18b0589206684c1a2d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7669767574696f2f7064662d7363726962652d62756e646c65)](https://packagist.org/packages/vivutio/pdf-scribe-bundle)[![Packagist Downloads](https://camo.githubusercontent.com/98b7d4834c724b9d921227787730b4f50cb5e9e0d8d6de4f2531bb1094cd447b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7669767574696f2f7064662d7363726962652d62756e646c65)](https://packagist.org/packages/vivutio/pdf-scribe-bundle)[![License](https://camo.githubusercontent.com/9d78ab9bbbd1e1f23f8e97544f5c798ebd8b0281003ce321d399a13b839f6a74/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7669767574696f2f7064662d7363726962652d62756e646c65)](https://packagist.org/packages/vivutio/pdf-scribe-bundle)

A Symfony 7/8 bundle for generating PDFs using Chrome Headless. Provides excellent CSS support with the modern Chrome rendering engine.

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

[](#installation)

```
composer require vivutio/pdf-scribe-bundle
```

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

[](#configuration)

Create `config/packages/pdf_scribe.yaml`:

```
pdf_scribe:
    binary_path: '%env(PDF_SCRIBE_BINARY)%'
    timeout: 120
    options:
        print-background: true
        no-pdf-header-footer: true
```

Add to `.env`:

```
# macOS
PDF_SCRIBE_BINARY="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

# Linux
PDF_SCRIBE_BINARY=/usr/bin/chromium-browser
```

Usage
-----

[](#usage)

```
use Vivutio\PdfScribeBundle\Contract\PdfGeneratorInterface;

class InvoiceController extends AbstractController
{
    public function download(Invoice $invoice, PdfGeneratorInterface $pdf): Response
    {
        $html = $this->renderView('invoice/pdf.html.twig', [
            'invoice' => $invoice,
        ]);

        $content = $pdf->fromHtml($html);

        return new Response($content, 200, [
            'Content-Type' => 'application/pdf',
            'Content-Disposition' => 'attachment; filename="invoice.pdf"',
        ]);
    }
}
```

API
---

[](#api)

### PdfGeneratorInterface

[](#pdfgeneratorinterface)

- `fromHtml(string $html, array $options = []): string` - Generate PDF from HTML string
- `fromUrl(string $url, array $options = []): string` - Generate PDF from URL
- `saveFromHtml(string $html, string $outputPath, array $options = []): void` - Save PDF from HTML to file
- `saveFromUrl(string $url, string $outputPath, array $options = []): void` - Save PDF from URL to file

Options
-------

[](#options)

OptionTypeDescription`print-background`boolPrint background graphics`no-pdf-header-footer`boolRemove default header/footer`landscape`boolLandscape orientation`scale`floatScale factor (0.1 to 2.0)CSS @page Rules
---------------

[](#css-page-rules)

Control page size and margins via CSS in your HTML template:

```
@page {
    size: A4;
    margin: 15mm;
}

@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
```

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance80

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

106d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/199f5643b7a7b70f87c1e9724fe6144384970c3c19bc7dd78b7b9d6a21c51b77?d=identicon)[eemjema](/maintainers/eemjema)

---

Top Contributors

[![eemjema](https://avatars.githubusercontent.com/u/59482766?v=4)](https://github.com/eemjema "eemjema (8 commits)")

---

Tags

symfonybundlepdfheadlesschromehtml-to-pdf

### Embed Badge

![Health badge](/badges/vivutio-pdf-scribe-bundle/health.svg)

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

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[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)[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)[ensepar/html2pdf-bundle

Use HTML2PDF as a Symfony Service

27669.3k](/packages/ensepar-html2pdf-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)

PHPackages © 2026

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