Download the PHP package tobento/app-pdf without Composer

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

App PDF

PDF support for the application, built on top of the PDF Service.

Table of Contents

Getting Started

Add the latest version of the app pdf project running this command.

Requirements

Documentation

App

Check out the App Skeleton if you are using the skeleton.

You may also check out the App to learn more about the app in general.

PDF Boot

The Pdf boot integrates the Tobento PDF Service into your application and registers all PDF-related handlers. It provides:

PDF Config

The configuration for the pdf is located in the file at the default App Skeleton config location where you can specify the pdf generators for your application.

Basic Usage

If you're new to working with PDFs in Tobento, start with the
Basic Usage section of the PDF Service.
It explains how to create PDF definitions using views, HTML, or raw content, and provides the foundation for how App-PDF builds on top of the underlying service.

Using PDF Handler

The PDF handler coordinates everything that happens after you define a PDF.
By attaching parameters to the Pdf object, you can instruct the handler to:

These parameters can be used individually or combined.
When queueing is enabled, the handler prepares a queue job and then executes only the immediate actions (such as download).
All deferred actions - like storing the PDF or sending it to a webhook - are performed later inside the queue job.
The PDF is rendered only once, even when multiple actions are defined.

The Pdf object offers a fluent API, allowing you to define content and attach parameters in a clean and expressive way.

Example

The example below shows how to define a PDF, attach multiple parameters, and let the handler orchestrate the workflow:

Storing

The store() parameter instructs the handler to save the rendered PDF to a specific storage and path.
If queueing is enabled, storing is not performed during the request. Instead, it is executed later inside the queue job.

This feature is powered by the application's app-file-storage system, which provides unified storage handling, directory creation, and driver-based file operations.

The storage name must refer to a configured storage in your application
(for example via your file storage configuration).
The path may include folders and will be created automatically if supported by the storage driver.

Events

When storing is used, the following events may be dispatched:

These events allow you to hook into the storage lifecycle and extend the behavior as needed.

Downloading

The download() parameter instructs the handler to emit the rendered PDF as an HTTP response.
Downloading is always an immediate action and is executed during the request, even when queueing is enabled.

When a download parameter is present, the download handler:

If inline is set to true, the PDF is displayed in the browser (if supported); otherwise, the browser will treat it as a file download.

Events

When downloading is used, the following events may be dispatched:

These events allow you to hook into the download lifecycle and extend the behavior as needed.

Webhook

The webhook() parameter instructs the handler to send the generated PDF to a remote endpoint.
Webhook delivery is always an immediate action and is executed during the request, even when queueing is enabled.

When a webhook parameter is present, the webhook handler:

If the remote endpoint responds with an error or cannot be reached, a PdfException may be thrown depending on your configuration.

Example Webhook Payload

When a webhook is configured, the handler sends a JSON payload to the specified endpoint.

If attachPdf is true (default), the generated PDF is included as a Base64‑encoded string:

Notes

Events

When a webhook is used, the following events may be dispatched:

These events allow you to hook into the webhook lifecycle and extend the behavior as needed.

Queueing

Queueing allows PDF generation and its associated actions (such as storing or sending a webhook)
to be executed asynchronously in a background worker instead of during the HTTP request.

This is useful when generating large PDFs or when performing slow operations such as storage or webhook delivery.

This feature is powered by the application's app-queue system, which handles job dispatching, retry logic, delays, and worker execution.

When queueing is enabled:

Queueing does not change the behavior of the individual handlers - it only defers their execution.

Example Workflow

If you combine queueing with storing and a webhook:

The worker will:

All outside the original HTTP request.

Events

When queueing is used, the following events may be dispatched:

These events allow you to hook into the queue lifecycle and extend the behavior as needed.

Credits


All versions of app-pdf with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
tobento/app Version ^2.0
tobento/app-event Version ^2.0
tobento/app-file-storage Version ^2.0
tobento/app-http Version ^2.0
tobento/app-migration Version ^2.0
tobento/app-queue Version ^2.0
tobento/app-view Version ^2.0
tobento/service-pdf Version ^2.0
psr/event-dispatcher 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 tobento/app-pdf contains the following files

Loading the files please wait ...