• Stars
    star
    1,433
  • Rank 31,298 (Top 0.7 %)
  • Language
    PHP
  • License
    Other
  • Created almost 8 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TCPDF - PHP PDF Library - https://tcpdf.org

tc-lib-pdf

PHP PDF Library

UNDER DEVELOPMENT (NOT READY)

UPDATE: CURRENTLY ALL THE DEPENDENCY LIBRARIES ARE ALMOST COMPLETE BUT THE CORE LIBRARY STILL REQUIRES A SIGNIFICANT AMOUNT OF WORK TO BE COMPLETED.

Latest Stable Version Master Build Status Master Coverage Status License Total Downloads

Donate via PayPal Please consider supporting this project by making a donation via PayPal

Description

PHP library for generating PDF documents on-the-fly.

Main Features:

  • no external libraries are required for the basic functions;
  • all standard page formats, custom page formats, custom margins and units of measure;
  • UTF-8 Unicode and Right-To-Left languages;
  • TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts;
  • font subsetting;
  • methods to publish some XHTML + CSS code, Javascript and Forms;
  • images, graphic (geometric figures) and transformation methods;
  • supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/script/formats.php)
  • 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
  • JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Pdfs and Transparencies;
  • automatic page header and footer management;
  • document encryption up to 256 bit and digital signature certifications;
  • transactions to UNDO commands;
  • PDF annotations, including links, text and file attachments;
  • text rendering modes (fill, stroke and clipping);
  • multiple columns mode;
  • no-write page regions;
  • bookmarks, named destinations and table of content;
  • text hyphenation;
  • text stretching and spacing (tracking);
  • automatic page break, line break and text alignments including justification;
  • automatic page numbering and page groups;
  • move and delete pages;
  • page compression (requires php-zlib extension);
  • XOBject Templates;
  • Layers and object visibility.
  • PDF/A-1b support.

Third party fonts:

This library may include third party font files released with different licenses.

All the PHP files on the fonts directory are subject to the general TCPDF license (GNU-LGPLv3), they do not contain any binary data but just a description of the general properties of a particular font. These files can be also generated on the fly using the font utilities and TCPDF methods.

All the original binary TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files).

The binary files (.z) that begins with the prefix "free" have been extracted from the GNU FreeFont collection (GNU-GPLv3). The binary files (.z) that begins with the prefix "pdfa" have been derived from the GNU FreeFont, so they are subject to the same license. For the details of Copyright, License and other information, please check the files inside the directory fonts/freefont-20120503 Link : http://www.gnu.org/software/freefont/

The binary files (.z) that begins with the prefix "dejavu" have been extracted from the DejaVu fonts 2.33 (Bitstream) collection. For the details of Copyright, License and other information, please check the files inside the directory fonts/dejavu-fonts-ttf-2.33 Link : http://dejavu-fonts.org

The binary files (.z) that begins with the prefix "ae" have been extracted from the Arabeyes.org collection (GNU-GPLv2). Link : http://projects.arabeyes.org/

ICC profile:

TCPDF includes the sRGB.icc profile from the icc-profiles-free Debian package: https://packages.debian.org/source/stable/icc-profiles-free

Getting started

First, you need to install all development dependencies using Composer:

$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer

You can install the library via composer:

composer require tecnickcom/tc-lib-pdf

This project include a Makefile that allows you to test and build the project with simple commands. To see all available options:

make help

To install all the development dependencies:

make deps

Running all tests

Before committing the code, please check if it passes all tests using

make qa

All artifacts are generated in the target directory.

Example

Examples are located in the example directory.

Start a development server (requires PHP 5.4) using the command:

make server

and point your browser to http://localhost:8000/index.php

Installation

Create a composer.json in your projects root-directory:

{
    "require": {
        "tecnickcom/tc-lib-pdf": "dev-main"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "[email protected]:tecnickcom/tc-lib-pdf.git"
        }
    ]
}

Packaging

This library is mainly intended to be used and included in other PHP projects using Composer. However, since some production environments dictates the installation of any application as RPM or DEB packages, this library includes make targets for building these packages (make rpm and make deb). The packages are generated under the target directory.

When this library is installed using an RPM or DEB package, you can use it your code by including the autoloader:

require_once ('/usr/share/php/Com/Tecnick/Barcode/autoload.php');

Developer(s) Contact

More Repositories

1

TCPDF

Official clone of PHP library to generate PDF documents and barcodes
PHP
3,809
star
2

tcexam

TCExam is a CBA (Computer-Based Assessment) system (e-exam, CBT - Computer Based Testing) for universities, schools and companies, that enables educators and trainers to author, schedule, deliver, and report on surveys, quizzes, tests and exams.
PHP
516
star
3

tc-lib-barcode

PHP library to generate linear and bidimensional barcodes
PHP
250
star
4

alldev

Dockerfile to build a generic development environment based on Ubuntu Linux
Dockerfile
41
star
5

tc-lib-pdf-parser

PHP library to parse PDF documents
PHP
26
star
6

inedi

iNEDI (improved New Edge-Directed Interpolation) Image Zooming Algorithm
MATLAB
25
star
7

tc-lib-color

PHP library to manipulate various color representations
PHP
21
star
8

gogen

Command-line tool to generate GO applications and libraries
Go
18
star
9

tc-lib-pdf-font

PHP library containing PDF font methods and utilities
PHP
17
star
10

tc-lib-unicode

PHP library containing Unicode methods
PHP
10
star
11

pygen

Command-line tool to generate Python applications and libraries
Python
8
star
12

web-cctray

Web-based dashboard for CI/CD cctray.xml files
JavaScript
7
star
13

rndpwd

Command line and Web Service Random Password Generator written in GO
Go
7
star
14

tc-lib-pdf-encrypt

PHP library to encrypt data for PDF documents
PHP
7
star
15

tc-lib-file

PHP library to read byte-level data from files
PHP
7
star
16

tc-lib-pdf-filter

PHP library to decode PDF compression and encryption filters
PHP
6
star
17

edgetools

Matlab tools to find edges of a digital image
MATLAB
6
star
18

binsearch

Search unsigned integers in sorted binary file
C
6
star
19

tc-lib-pdf-page

PHP library containing PDF page formats and definitions
PHP
6
star
20

tc-lib-pdf-image

PHP library containing PDF Image methods
PHP
6
star
21

farmhash64

farmhash64 is a portable C99 64-bit hash function
Go
6
star
22

tc-lib-unicode-data

PHP library containing UTF-8 font definitions
PHP
5
star
23

tc-lib-pdf-graph

PHP library containing PDF graphic and geometric methods
PHP
5
star
24

ServerUsage

The ServerUsage system is designed to collect and process statistic information from computers running a GNU-Linux Operating System.
C
3
star
25

demo-srv-idp

Multi-container demo of srv-idp (SAML Identity Provider Service for ZFA-SSO)
PHP
3
star
26

tc-font-pdfa

Type1 core fonts for PDF/A
PostScript
3
star
27

tc-font-mirror

Mirror for several OpenSource Fonts
PostScript
3
star
28

wordfreq

Parse an input file and return the most frequently used words with their frequency.
C
2
star
29

test

test
2
star
30

go-xsd-pkg

Go wrappers for various XML formats
Go
2
star
31

rgen

Command-line tool to generate R projects
Makefile
2
star
32

unitmulti

Convert base unit values to multiples and submultiples
Python
2
star
33

docker-php-saml

Dockerfile for onelogin/php-saml
Makefile
2
star
34

natsping

NATS Bus Test Component
Go
2
star
35

bloom

Go package implementing Bloom filters
Go
2
star
36

LogPipe

PHP module to extend the default PHP error handling function.
C
2
star
37

tc-lib-testrest

Library to test end-to-end RESTful services using Behat
PHP
2
star
38

archive-sourceforge-nicolaasuni

Historic SourceForge archive of old open source projects by Nicola Asuni
PHP
2
star
39

tc-font-core14-afms

Adobe Postscript(R) Core 14 AFM Files
2
star
40

variantkey

Numerical Encoding for Human Genetic Variants and Regions
C
2
star
41

natstest

NATS Bus Functional Test Component
Go
2
star
42

rpistat

Web-Service to collect system usage statistics
Go
1
star