Download the PHP package drewlabs/php-dompdf without Composer

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

Library Documentation

This library is build on top of [https://github.com/dompdf/dompdf] PHP library for converting html document to PDF. It provides users with API for reading document from file path, psr7 stream object or even PHP SplFileInfo class. It also provides developpers with a response object that inherit from symfony HTTP response object for returns PDF as response.

Installation

The library is build with composer requirements in mind and requires composer package manager for installation. To install the library to your PHP project:

composer require drewlabs/php-dompdf

Usage

To create a PDF instance, use the proxy function provides by the package:

The package provides a factory class for creating DOMPdf instances. For Object Oriented enthousiast, creating a dom-pdf instance is simply as:

The Dompdf provides developper with various method for loading DOM string from system path, SplFileInfo instance, psr7 compatible stream object or inline string.

-- Generic method

For all mentionned above types, the library provide a single method for reading dom string:

Aside the generic method Domdfp::read, the library provides a 2 additional method for reading raw string or url resource.

Utility methods

setPaperOrientation($size, $orientation) is the API provided to modify the paper size and orientation.

size : Drewlabs\Dompdf\Size::LETTER, Drewlabs\Dompdf\Size::LEGAL, Drewlabs\Dompdf\Size::A4 orientation : Drewlabs\Dompdf\Orientation::LANDSCAPE, Drewlabs\Dompdf\Orientation::PORTRAIT

The library provides developper with a method to return the generated PDF string through the Dompdf::print API. To print a raw document:

The Dompdf::download(string $name) API allows developper to create a response object from the PDF content.

The library provides developper with method to streaming pdf content to request client.


All versions of php-dompdf with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
dompdf/dompdf Version ^1.0.2|^2.0.1
symfony/http-foundation Version ^5.1.5
nyholm/psr7 Version ^1.5
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 drewlabs/php-dompdf contains the following files

Loading the files please wait ....