Download the PHP package heimrichhannot/contao-pdf-creator-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-pdf-creator-bundle. 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 contao-pdf-creator-bundle

Contao PDF Creator Bundle

This bundle adds a generic way to configure the creation of pdf files, reuse these configurations and create pdfs on base of them. It's based on PDF Creator library.

Features

Note: there is no pdf library bundled with this bundle, you need to add the ones you want to use by your own! See Usage section for more information.

Screenshot Configuration

Usage

Setup

  1. Install the pdf library you want to use (currently dompdf, mpdf and tcpdf are supported, see PDF Creator library) for more information
  2. Install bundle with composer or contao manager

    composer require heimrichhannot/contao-pdf-creator-bundle
  3. Update database
  4. Create a pdf configuration in contao backend within system -> pdf configuration or via yaml (see configuration reference)

Yaml pdf configuration

To reuse configurations or customize them on different environments, you can set pdf creator configs in your configuration files. You'll find all possible options in the configuration reference.

Example:

Export article as pdf

  1. Set huh_pdf_creator.enable_contao_article_pdf_syndication to true

  2. Clear cache and update database
  3. Choose pdf as syndication option in article configuration and select a pdf configuration

Syndication Bundle

Select PDF syndication and choose the pdf creator setting you want for export.

Advanced topics

Logging

To get enhanced debug information while creating pdfs, you can enter the contao dev mode. In dev mode, pdf creator bundle save all logs created by the pdf library (if the library supports PSR-3 logging) to a huh_pdf_creator-[DATE].log file in the log folder. For dompdf this bundle support the custom logging implementation and stores the log to a huh_pdf_creator-dompdf.log file in the log folder.

Server routing issues / authentication

To avoid trouble with server routing (special url handling with docker etc.) and use the library on access restricted websites (for example staging setups), you can set a base_url that will override the url determined from the request and credentials (http basic authentication is supported only). These options are only available with yaml configuration as they usually server-specific.

DomPdf chroot setting

Pdf Creator Bundle comes with default settings for dompdf chroot option for the most typical folders where files are stored, that are used in pdfs. You can adjust this settings in the bundle configuration.

These are the default settings:

Developer

Add pdf creator to your bundle

  1. Use PdfGenerator::generate() to generate a pdf with your content. It expects an id of an PDF Creator config, html content and an PdfContext instance and returns a PdfCreatorResult instance.

  2. Use DcaGenerator to add an PDF Creator config field to your dca.

Events

Event Description
BeforeCreateLibraryInstanceEvent Passes the PDF Creator BeforeCreateLibraryInstanceCallback
BeforeOutputPdfCallbackEvent Passes the PDF Creator BeforeOutputPdfCallback

More information

Configuration reference


All versions of contao-pdf-creator-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ausi/slug-generator Version ^1.1
contao/core-bundle Version ^4.9
heimrichhannot/contao-multi-column-editor-bundle Version ^2.12
heimrichhannot/pdf-creator Version ^0.4
psr/log Version ^1.0 || ^2.0 || ^3.0
symfony/event-dispatcher-contracts Version ^1.0 || ^2.0 || ^3.0
symfony/filesystem Version ^4.4 || ^5.4
symfony/service-contracts Version ^1.0 || ^2.0 || ^3.0
symfony/translation-contracts Version ^1.0 || ^2.0 || ^3.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 heimrichhannot/contao-pdf-creator-bundle contains the following files

Loading the files please wait ....