Giter Site home page Giter Site logo

pdf-php's Introduction

ROS PHP Pdf creation class

Version 0.12.20 | Author: ole1986 | License: GNU Lesser General Public License (LGPLv3)
Build Status

ros.jpg

This is the offical GIT clone from the R&OS PHP Pdf class previously stored on https://sourceforge.net/projects/pdf-php/

The R&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 : DOWNLOAD

Features

  • Quick and easy to use
  • Support for extension classes
  • Unicode and ANSI formated text
  • Custom TTF fonts and font subsetting (version >= 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

Copy the src folder into your project directory and include the Cezpdf.php using php include 'src\Cezpdf.php'

Example

<?php
	include 'Cezpdf.php';
	// initialize a ROS PDF class object using DIN-A4, with background color gray
	$pdf = new Cezpdf('a4','portrait','color',array(0.8,0.8,0.8));
	// set pdf Bleedbox
	$pdf->ezSetMargins(20,20,20,20);
	//use one of the pdf core fonts
	$mainFont = 'Times-Roman';
	// select the font
	$pdf->selectFont($mainFont);
	// define the font size
	$size=12;
	// modified to use the local file if it can
	$pdf->openHere('Fit');

	// Output some colored text by using text directives and justify it to the right of the document
	$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'));
	// output the pdf as stream, but uncompress
	$pdf->ezStream(array('compress'=>0));
 ?>

pdf-php's People

Contributors

ole1986 avatar lsolesen avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.