Merge pull request #853 from growlingflea/alternative-deidentification-script-unrecov...
[openemr.git] / vendor / rospdf / pdf-php / README.md
blob33dca92ac2490060fb6fe52c50edccbb5fed45a4
1 # ROS PHP Pdf creation class
3 [![Latest Stable Version](https://poser.pugx.org/rospdf/pdf-php/v/stable)](https://packagist.org/packages/rospdf/pdf-php) [![Total Downloads](https://poser.pugx.org/rospdf/pdf-php/downloads)](https://packagist.org/packages/rospdf/pdf-php) [![Latest Unstable Version](https://poser.pugx.org/rospdf/pdf-php/v/unstable)](https://packagist.org/packages/rospdf/pdf-php) [![License](https://poser.pugx.org/rospdf/pdf-php/license)](https://packagist.org/packages/rospdf/pdf-php) [![Build Status](https://travis-ci.org/rospdf/pdf-php.svg?branch=master)](https://travis-ci.org/rospdf/pdf-php) 
5 ![ros.jpg](https://raw.githubusercontent.com/rospdf/pdf-php/master/ros.jpg "R&OS PHP Pdf creation class")
7 This is the offical GIT clone from the R&OS PHP Pdf class previously stored on [sourceforge.net/projects/pdf-php](https://sourceforge.net/projects/pdf-php/). Development will take place here now.
9 The R&OS Pdf class is used to generate PDF Documents using PHP without installing any additional modules or extensions
10 It comes with a base class called "Cpdf.php" plus a helper class "Cezpdf.php" to generate tables, add backgrounds and provide paging.
12 <div align="center"> <a href="https://github.com/rospdf/pdf-php/blob/master/readme.pdf">DOCUMENTATION</a> : <a href="http://pdf-php.sf.net/">WEBSITE</a></div>
14 ## Features
15 - Quick and easy to use
16 - Support for extension classes
17 - Unicode and ANSI formated text
18 - Custom TTF fonts and font subsetting (version >= 0.11.8)
19 - Auto page and line breaks
20 - Text alignments (left, right, center, justified)
21 - Linked XObjects
22 - Internal and external links
23 - Compression by using gzcompress
24 - Encryption 40bit, 128bit since PDF 1.4
25 - Image support for JPEG, PNG and GIF (partly)
26 - Template support
28 ## Installation
30 ### Manual Download
32 Open the [RELEASE](https://github.com/rospdf/pdf-php/releases) page and pick the latest version to download.
34 Extract the archive into your project directory
36 ### Clone via git
38 You can also use git to install it using:
40     git clone https://github.com/rospdf/pdf-php.git
41     git checkout <latest-version>
42         
44 ### Installation via composer
46 This library is also available on the dependecy manager `composer` - https://packagist.org/packages/rospdf/pdf-php
48 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`
50         ./composer.phar require rospdf/pdf-php
52 For more details on how to use `composer` please refer to the documentation - https://getcomposer.org/doc/
54 ### Example
56 ```php
57 <?php
59 include 'src/Cezpdf.php'; // Or use 'vendor/autoload.php' when installed through composer
61 // Initialize a ROS PDF class object using DIN-A4, with background color gray
62 $pdf = new Cezpdf('a4','portrait','color',array(0.8,0.8,0.8));
63 // Set pdf Bleedbox
64 $pdf->ezSetMargins(20,20,20,20);
65 // Use one of the pdf core fonts
66 $mainFont = 'Times-Roman';
67 // Select the font
68 $pdf->selectFont($mainFont);
69 // Define the font size
70 $size=12;
71 // Modified to use the local file if it can
72 $pdf->openHere('Fit');
74 // Output some colored text by using text directives and justify it to the right of the document
75 $pdf->ezText("PDF with some <c:color:1,0,0>blue</c:color> <c:color:0,1,0>red</c:color> and <c:color:0,0,1>green</c:color> colours", $size, array('justification'=>'right'));
76 // Output the pdf as stream, but uncompress
77 $pdf->ezStream(array('compress'=>0));
79 ```
81 ## Contributors
83 [ole1986](http://github.com/ole1986) is lead developer. 
85 See the full list of [contributors](https://github.com/rospdf/pdf-php/graphs/contributors).