Download the PHP package endroid/pdf without Composer

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

PDF

By endroid

Latest Stable Version Build Status Total Downloads License

Library for easy PDF generation built around wkhtmltopdf and Snappy. Click here for an example. Please note this example takes some time to load because it contains a lot of pages and no caching is applied.

Read the blog for more information on why I created this library and how to use it.

Easy data loading

When you generate a PDF you need to make sure you pass the right contents to the PDF object. This data can come from any source (a file, a URL, a controller) and some of these impose a performance hit so you often want to cache some of these contents instead of loading the data every time you generate the PDF.

The endroid/asset takes this burden away by allowing you to define your assets via a simple array of options. The asset factory and guesser make sure the right type of asset is created and even provide a so called cache asset that wraps any other asset.

For more information read the documentation.

Handling external resources

An HTML page can contain a number of external resources, each triggering a separate request. However during PDF generation this can lead to performance or even stability issues. Therefor we need the number of requests to be as low as possible.

The endroid/embed library helps you minimize the number of assets to load during PDF generation by allowing you to embed external resources via a Twig extension. You can use this extension to embed resources like fonts, stylesheets and scripts.

For more information you can read the documentation.

The PDF builder

When endroid/installer detects Symfony the builder is automatically wired and you can immediately start using it to build a PDF. This is an example of how you can use the builder.

Installation

Use Composer to install the library.

Symfony

When you use Symfony, the installer makes sure that services are automatically wired. If the Snappy\Pdf service is not registered yet, make sure you create a service definition for it or install the knplabs/snappy-bundle along with the library.

Also, if any of the asset types is unsupported (for instance because you have no cache component or Twig available) or if you simply don't want some to be registered you can uncomment the adapter via the service configuration.

Bootstrapping the PDF builder

When no autowiring is available you need to instantiate and wire the necessary dependencies yourself. You can do so via a bootstrap file for instance.

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatible changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.


All versions of pdf with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
endroid/asset Version ^2.0.1
endroid/embed Version ^1.1.1
endroid/installer Version ^1.3.2
h4cc/wkhtmltopdf-amd64 Version ^0.12.4
iio/libmergepdf Version ^4.0
knplabs/knp-snappy Version ^1.0
symfony/http-foundation Version ^5.4||^6.4||^7.0
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 endroid/pdf contains the following files

Loading the files please wait ....