Download the PHP package pmarien/html-to-pdf-bundle without Composer

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

pmarien/html-to-pdf-bundle

Symfony integration for pmarien/html-to-pdf

  1. Requirements
  2. How to install?
  3. How to configure?
  4. How to use internal assets?
  5. How to use?
    1. Controller (Inline PDF)
    2. Controller (Download PDF)
    3. Controller (Store PDF file)
    4. With Twig Templates
      1. Controller (Inline PDF)
      2. Controller (Download PDF)
      3. Controller (Store PDF file)

Requirements

The bundle requires PHP in version 8.1 or higher and Symfony in version 5, 6 or 7.

The html-to-pdf-library requires implementations of psr/http-message, psr/http-factory and psr/http-client.

How to install?

The bundle should be installed via composer: pmarien/html-to-pdf.

How to configure?

If you want to configure the bundle you should add the file config/packages/html_to_pdf.yaml.

Without api key configuration the bundle will act as anonymous client, which leads to a limit of 3 generated PDF files per day.

How to use internal assets?

If you want to use assets in your pdf, they have to be public accessible via http for the pdf generator. Sometimes you want to use the assets, but don't want to publish them. For those cases, this bundle comes with an AssetAccessController, which requires a hash for file protection.

The routing have to be enabled via config (config/routes/html_to_pdf.yaml):

Asset uris can be build manually (route name: html_to_pdf_get_file, required parameters: filename and hash) or via twig filter:

If you build uris manually, the hash can be generated via PMA\HtmlToPdfBundle\Asset\AssetAccessorInterface::getHash (available as symfony service).

How to use?

If you want to generate pdf files directly from html, you should use PMA\HtmlToPdfBundle\Bridge\FoundationBridge as generator. It's available as service in the service container and may be autowired by symfony's dependency injection.

Controller (Inline PDF)

Controller (Download PDF)

Service (Store PDF file)

Twig

If you want to generate pdf files from twig templates, you should use PMA\HtmlToPdfBundle\Bridge\TwigBridge as generator. It's available as service in the service container and may be autowired by symfony's dependency injection. It requires Twig to be installed in your project.

Controller (Inline PDF file)

Controller (Download PDF file)

Service (Store PDF file)


All versions of html-to-pdf-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/framework-bundle Version ^5.0|^6.0|^7.0
symfony/psr-http-message-bridge Version ^2.0|^6.0|^7.0
pmarien/html-to-pdf Version ^1.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 pmarien/html-to-pdf-bundle contains the following files

Loading the files please wait ....