Download the PHP package utafitilabs/pdf-scribe-bundle without Composer

On this page you can find all versions of the php package utafitilabs/pdf-scribe-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pdf-scribe-bundle

Headless Chrome PDFs for Symfony!

CI Latest Version Total Downloads

This bundle turns HTML or a URL into a PDF with headless Chrome/Chromium — the same rendering engine your templates were written for, so modern CSS, web fonts and @page rules print exactly as they display. One injectable PdfGeneratorInterface, bytes back or a file on disk, sensible defaults. Enable the bundle, point it at a browser, and go.

Part of the utafiti tools.

Why

PHP-native PDF libraries render a subset of CSS and fall over on flexbox, grid or @font-face; wiring a browser by hand means a process call, temp files, timeouts and cleanup in every project. This bundle handles all of it: render a Twig template as you already do, hand the HTML over, get a PDF.

Install

Applications using Symfony Flex:

Applications without Symfony Flex — after requiring the package, enable the bundle:

That one line registers the PdfGeneratorService and aliases it to PdfGeneratorInterface, with a 120 s timeout and background printing on. Nothing else to configure — unless your browser lives somewhere other than the default macOS path, in which case name it:

A taste

Methods: fromHtml, fromUrl (return the PDF bytes), saveFromHtml, saveFromUrl (write to a path). Per-call options override the configured defaults: print-background (bool), no-pdf-header-footer (bool), landscape (bool), scale (float, 0.1–2.0), virtual-time-budget (ms, lets page scripts finish before printing). Page size and margins are CSS, in your template:

Every failure — missing or non-executable binary, non-zero exit, no output file — raises PdfGenerationException with the reason in the message.

Documentation

Read the documentation at docs/index.md.

Requirements

Contributing

See CONTRIBUTING.md. CI enforces the standard (php-cs-fixer, PHPStan max, PHPUnit driving a stand-in browser binary, lowest→newest dependency matrix) on every pull request.

Credits

License

MIT License (MIT): see the LICENSE file for more details.


All versions of pdf-scribe-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
symfony/config Version ^7.3 || ^8.0
symfony/dependency-injection Version ^7.3 || ^8.0
symfony/http-kernel Version ^7.3 || ^8.0
symfony/process Version ^7.3 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package utafitilabs/pdf-scribe-bundle contains the following files

Loading the files please wait ...