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(5mo ago)029MITPHPPHP &gt;=8.2

Since Feb 1Pushed 5mo 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 today

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

31

—

LowBetter than 66% of packages

Maintenance73

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

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

152d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/59482766?v=4)[Ezekiel Mjema](/maintainers/eemjema)[@eemjema](https://github.com/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)
```

PHPackages © 2026

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