Skip to content
ComPDF

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

3.2 Get Started with ComPDFKit API in PHP

Requirements:

Programming Environment: PHP Version 7.0 and higher.

Dependencies: Composer.

Installation:

You can install the library via Composer. Run the following command:

shell
composer require compdfkit/compdfkit-api-php

Alternatively, you can add "compdfkit/compdfkit-api-php": "^1.3.2" to your composer.json file and then run.

shell
composer update

If you are not using a PHP framework with autoload feature,to use the library, use Composer's autoload:

PHP
require_once('vendor/autoload.php');