Download the PHP package chrisbraybrooke/laravel-chrome-pdf without Composer

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

Laravel PHP Chrome HTML to PDF

Important note regarding git

If you keep you vendor folder in source control - then you may want to consider placing the following in you .gitignore file. The reason for this is that the chromium rendering engine contains files that are larger than GitHubs 100mb limit.

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 / Laravel 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.

Installation

Setup:

Laravel >=5.5

Laravel 5.5 and above uses package autodiscovery so you are all done! Skip to Usage.

Laravel 5.5<

If you are using Laravel 5.4 or below, you will have to manually register the package. After updating composer, add the ServiceProvider to the providers array in config/app.php.

And optionally add the Facade.

Usage:

Below is an example of creating a simple PDF from a blade file.

Outputs:

There are several methods of outputting the PDF.

Of course download is available.

Use inline to show the PDF inline in the browser.

Or save to save the file to the filesystem. The first argument is the filename / path - and the second is the disk to be used.

Options:

It is simple to set options for the PDF.

Just use the setOption or setOptions methods.

Or set multiple options at once.

All available php-chrome-html2pdf options are available.

There are also a few helper methods, which can be chained.

Maintenance:

My company Purple Mountain - A web development company in the UK, will try our best to keep this package up to date and free from any issues.


All versions of laravel-chrome-pdf with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version 5.5.x|5.6.x|5.7.x|5.8.x
illuminate/filesystem Version 5.5.x|5.6.x|5.7.x|5.8.x
php Version >=7.0
spiritix/php-chrome-html2pdf Version 1.3.*
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 chrisbraybrooke/laravel-chrome-pdf contains the following files

Loading the files please wait ....