Skip to content

Getting Started

Installation and usage of the package is quite straight forward.

Before diving in, please review the version support table, which outlines the compatibility between different versions of WeasyPrint and the package. Typically, it’s recommended to ensure you’re using the latest versions of both WeasyPrint and the package.

Installation

First make sure the approproate version of WeasyPrint is installed on your system.

Then, install the package with Composer:

shell
composer require rockett/weasyprint

The package will be discovered and registered automatically.

If you would like to publish the default configuration, then run this command:

shell
$ php artisan vendor:publish --tag=weasyprint.config

TIP: Prefer configuration-by-environment

It’s recommended to rely on environment variables for configuration options instead of publishing the configuration file. Publish the config file only if you need to modify environment variable names or fetch them in a different way.

Released under the ISC License.