Download the PHP package spiritix/php-chrome-html2pdf without Composer

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

PHP Chrome HTML to PDF

A PHP library for converting HTML to PDF using Chrome/Chromium.

PHP Checks Node.js Checks Code Climate Total Downloads Latest Stable Version Latest Unstable Version License

Contributors wanted! Have a look at the open issues and send me an email if you are interested in a quick introduction via Hangouts.

How it works

This library is based on puppeteer, a headless Chrome Node API which is maintained by the Chrome DevTools team.

It provides a simple PHP wrapper around the Node API, focused on generating beautiful PDF files.

In contrast to other HTML to PDF converters like wkhtmltopdf, the corresponding PHP wrapper or similar libraries, it is based on a current Chrome version instead of outdated and unmaintained WebKit builds. This library therefore fully supports CSS3, HTML5, SVGs, SPAs, and all the other fancy stuff people use these days.

Requirements

Installation

PHP Chrome HTML to PDF can be installed via Composer by requiring the spiritix/php-chrome-html2pdf package in your project's composer.json. Or simply run this command:

The required JS packages are installed automatically in the background.

Usage

Using this library is pretty straight forward. Decide for an input and an output handler, pass them to the converter, set some options if you like and depending on the output handler, proceed with the generated PDF file.

Input handlers

The following input handlers are available:

Output handlers

The following output handlers are available:

Options

NOTE headerTemplate and footerTemplate markup have the following limitations:

  1. Script tags inside templates are not evaluated.
  2. Page styles are not visible inside templates.

NOTE By default, this library generates a pdf with modified colors for printing. Use the -webkit-print-color-adjust property to force rendering of exact colors.

Troubleshooting

Contributing

Contributions in any form are welcome. Please consider the following guidelines before submitting pull requests:

License

PHP Chrome HTML to PDF is free software distributed under the terms of the MIT license.


All versions of php-chrome-html2pdf with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
oat-sa/composer-npm-bridge Version ^0.4
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 spiritix/php-chrome-html2pdf contains the following files

Loading the files please wait ....