Generate PDFs from web pages, blade templates, and more

v1.0.1 2024-12-08 17:30 UTC

This package is auto-updated.

Last update: 2024-12-08 22:31:10 UTC


README

Generate PDFs of web pages.

Browser

Uses chrome's instrumentation protocol via chrome-php to open pages and generate PDFs of them. This should be usable generally.

Generators

Intended for use within Laravel. Provides semantics vaguely similar to Laravel's HTTP request processing for generating PDFs:

  • Instantiate a request for a PDF
  • Pass it to the kernel
  • Kernel passes the request through any defined middleware
  • Request hits your specified generator which handles the request and returns a file.
  • Generated file percolates back up through the middleware back to the kernel.
  • Generated file is returned to you!

Tests

Phpunit is included in a separate composer file and must be explicitly installed:

$ cd tools/phpunit/
$ composer install

Once installed, the tests can be run from the root package folder with:

$ composer test

Legal

Copyright 2024 Adam Pippin hello@adampippin.ca

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.