Download the PHP package beganovich/snappdf without Composer

On this page you can find all versions of the php package beganovich/snappdf. 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 snappdf

snappdf

Packagist Version Total Downloads CI Status PHP Version License

snappdf

A simple library that lets you convert webpages or HTML into PDF files using Chromium-powered browsers.

Features

Requirements

Installation

Quick Start

Usage

From HTML

From URL

Custom Chromium Path

Laravel with Blade

Symfony Filesystem

Environment Variable

Nginx example:

Generate Without Saving

Stream to Browser

Priority: setChromiumPath() takes precedence, then SNAPPDF_EXECUTABLE_PATH, then local Chromium download.

Configuration

Chromium Arguments

Remove a single argument:

Override all default arguments with the SNAPPDF_EXECUTABLE_ARGUMENTS environment variable.

Note: --print-to-pdf is always added. --virtual-time-budget is added when waitBeforePrinting() is called.

Clear all arguments:

CLI Usage

Speed

snappdf communicates directly with the browser, generating PDFs in under 0.5 seconds with cold start on mid-range hardware (i5-5300U, SSD).

Chromium Management

Local Download

Downloads are stored in vendor/beganovich/snappdf/versions. The local revision is used only when no path is provided via setChromiumPath().

Note: snappdf downloads the latest Chromium build. Since Chromium has no stable or unstable releases, the browser may occasionally be buggy. For production environments, install Google Chrome stable and point the package to it.

Skip Download

Set the SNAPPDF_SKIP_DOWNLOAD environment variable to skip downloading Chromium.

Troubleshooting

If Chrome doesn't launch on UNIX, ensure the required system dependencies are installed. See Puppeteer's troubleshooting guide.

Debian (e.g. Ubuntu) Note: You might also need `libgbm-dev` and `libxshmfence-dev` (reported for Ubuntu 20.04).
CentOS After installing dependencies, update nss:
Related discussions - [#290](https://github.com/puppeteer/puppeteer/issues/290) — Debian troubleshooting - [#391](https://github.com/puppeteer/puppeteer/issues/391) — CentOS troubleshooting - [#379](https://github.com/puppeteer/puppeteer/issues/379) — Alpine troubleshooting

Smart Delay

Use waitBeforePrinting() to set a maximum delay (in milliseconds) before printing. This is useful for waiting on AJAX calls or chart libraries to finish loading.

If your AJAX call completes in 2 seconds, rendering starts immediately — it won't wait the full 10 seconds.

Temporary Files

Since version 3, snappdf cleans up temporary files automatically. To keep them:

Comparison to Browsershot

For more complex headless browser operations, use Spatie's Browsershot. snappdf is intentionally minimal — it only does PDFs and doesn't require Node.js.

Testing

Credits

License

The MIT License (MIT). See LICENSE for more information.


All versions of snappdf with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-zip Version *
symfony/process Version ^7.4 | ^8.0
symfony/console Version ^7.4 | ^8.0
symfony/filesystem Version ^7.4 | ^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 beganovich/snappdf contains the following files

Loading the files please wait ...