PHPackages                             rospdf/pdf-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. rospdf/pdf-php

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

rospdf/pdf-php
==============

The R&amp;OS Pdf class supports the creation of PDF documents without any adiditional modules or extensions.

0.12.67(3y ago)1471.2M—7.9%67[28 issues](https://github.com/rospdf/pdf-php/issues)[5 PRs](https://github.com/rospdf/pdf-php/pulls)3MITPHPPHP &gt;=5.6.0CI failing

Since May 12Pushed 2y ago19 watchersCompare

[ Source](https://github.com/rospdf/pdf-php)[ Packagist](https://packagist.org/packages/rospdf/pdf-php)[ Docs](https://github.com/rospdf/pdf-php)[ RSS](/packages/rospdf-pdf-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (49)Used By (3)

ROS PHP Pdf creation class
==========================

[](#ros-php-pdf-creation-class)

[![Latest Stable Version](https://camo.githubusercontent.com/cd51be1705fdd5dc405512e752c9271581e9f23fab1f124fcdcf91a08c9ae8a6/68747470733a2f2f706f7365722e707567782e6f72672f726f737064662f7064662d7068702f762f737461626c65)](https://packagist.org/packages/rospdf/pdf-php)[![Total Downloads](https://camo.githubusercontent.com/aa9447fcb56eef18a75d5267edf62f92b02949a5b814f557ac6a889ca14d6c6c/68747470733a2f2f706f7365722e707567782e6f72672f726f737064662f7064662d7068702f646f776e6c6f616473)](https://packagist.org/packages/rospdf/pdf-php)[![Daily Downloads](https://camo.githubusercontent.com/66231c5e2de154630bcaaab4cceec2888a8da85108344729cb52b3321bec9617/68747470733a2f2f706f7365722e707567782e6f72672f726f737064662f7064662d7068702f642f6461696c79)](https://packagist.org/packages/rospdf/pdf-php)[![License](https://camo.githubusercontent.com/cefd0a3807560527021b43cfaba33230f485c295399fd93e21b2d0718fd95c5f/68747470733a2f2f706f7365722e707567782e6f72672f726f737064662f7064662d7068702f6c6963656e7365)](https://packagist.org/packages/rospdf/pdf-php)[![Build](https://github.com/rospdf/pdf-php/actions/workflows/ci-build.yml/badge.svg)](https://github.com/rospdf/pdf-php/actions/workflows/ci-build.yml)[![Donations Badge](https://raw.githubusercontent.com/k4m4/donations/master/images/badge.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CCU8QYD549JCU&source=url)

[![ros.jpg](https://raw.githubusercontent.com/rospdf/pdf-php/master/ros.jpg "R&OS PHP Pdf creation class")](https://raw.githubusercontent.com/rospdf/pdf-php/master/ros.jpg)

This is the official GIT clone from the R&amp;OS PHP Pdf class previously stored on [sourceforge.net/projects/pdf-php](https://sourceforge.net/projects/pdf-php/). Development will take place here now.

The R&amp;OS Pdf class is used to generate PDF Documents using PHP without installing any additional modules or extensions It comes with a base class called "Cpdf.php" plus a helper class "Cezpdf.php" to generate tables, add backgrounds and provide paging.

 [DOCUMENTATION](https://github.com/rospdf/pdf-php/blob/master/readme.pdf) : [WEBSITE](https://pdf-php.sourceforge.net/) : [CONTRIBUTING](CONTRIBUTING.md)

Features
--------

[](#features)

- Quick and easy to use
- Support for extension classes
- Unicode and ANSI formatted text
- Custom TTF fonts and font subsetting (version &gt;= 0.11.8)
- Auto page and line breaks
- Text alignments (left, right, center, justified)
- Linked XObjects
- Internal and external links
- Compression by using gzcompress
- Encryption 40bit, 128bit since PDF 1.4
- Image support for JPEG, PNG and GIF (partly)
- Template support

Installation
------------

[](#installation)

### Manual Download

[](#manual-download)

Open the [RELEASE](https://github.com/rospdf/pdf-php/releases) page and pick the latest version to download.

Extract the archive into your project directory

### Clone via git

[](#clone-via-git)

You can also use git to install it using:

```
git clone https://github.com/rospdf/pdf-php.git
git checkout

```

### Installation via composer

[](#installation-via-composer)

This library is also available on the dependency manager `composer` -

Please follow the steps [here](https://getcomposer.org/download/) to install. Once this is done one simple command will get all dependencies for the package `rospdf/pdf-php`

```
./composer.phar require rospdf/pdf-php

```

For more details on how to use `composer` please refer to the documentation -

### Example

[](#example)

```
