Download the PHP package fruitcake/laravel-weasyprint without Composer

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

WeasyPrint PDF Wrapper for Laravel

Tests Packagist License Latest Stable Version Total Downloads Fruitcake

This package is a ServiceProvider for WeasyPrint: https://github.com/pontedilana/php-weasyprint.

This package is based heavily on https://github.com/barryvdh/laravel-snappy but uses WeasyPrint instead of WKHTMLTOPDF

WeasyPrint Installation

Follow the setup here: https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation

Testing the WeasyPrint installation

After installing, you should be able to run WeasyPrint from the command line / shell.

Package Installation

Require this package in your composer.json and update composer.

Configuration

You can publish the config file:

Usage

You can create a new WeasyPrint instance and load an HTML string, file or view name. You can save it to a file, or inline (show in browser) or download.

Using the App container:

Or use the Facade to access easy helper methods.

Inline a PDF:

Or download:

You can chain the methods:

You can change the orientation and paper size

If you need the output as a string, you can get the rendered PDF with the output() function, so you can save/output it yourself.

See the php-weasyprint for more information/settings.

Testing - PDF fake

As an alternative to mocking, you may use the WeasyPrint facade's fake method. When using fakes, assertions are made after the code under test is executed:

Other available assertions:

License

This WeasyPrint Wrapper for Laravel is open-sourced software licensed under the MIT license


All versions of laravel-weasyprint with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/support Version ^9|^10|^11
illuminate/filesystem Version ^9|^10|^11
pontedilana/php-weasyprint 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 fruitcake/laravel-weasyprint contains the following files

Loading the files please wait ....