config
2 months ago
fonts
2 years ago
include
2 months ago
LICENSE.TXT
2 months ago
Makefile
2 months ago
README.md
2 months ago
VERSION
2 months ago
tcpdf.php
2 months ago
tcpdf_autoconfig.php
2 months ago
tcpdf_barcodes_1d.php
2 months ago
tcpdf_barcodes_2d.php
2 months ago
README.md
132 lines
| 1 | # TCPDF |
| 2 | |
| 3 | > Legacy PDF engine for PHP. **Deprecated** and maintained for existing integrations. |
| 4 | |
| 5 | [](https://packagist.org/packages/tecnickcom/tcpdf) |
| 6 | [](https://packagist.org/packages/tecnickcom/tcpdf) |
| 7 | [](https://packagist.org/packages/tecnickcom/tcpdf) |
| 8 | [](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ) |
| 9 | |
| 10 | If TCPDF helps your business, please consider supporting development via [PayPal](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ). |
| 11 | |
| 12 | --- |
| 13 | |
| 14 | ## Deprecation Notice |
| 15 | |
| 16 | TCPDF is **deprecated** and in **maintenance-only mode**. |
| 17 | |
| 18 | Active feature development has moved to [tc-lib-pdf](https://github.com/tecnickcom/tc-lib-pdf), the modern and modular successor. |
| 19 | |
| 20 | For new projects, use `tecnickcom/tc-lib-pdf`. This repository remains available for legacy systems and critical compatibility fixes. |
| 21 | |
| 22 | ### Migration Path |
| 23 | |
| 24 | - New projects: install `tecnickcom/tc-lib-pdf`. |
| 25 | - Existing TCPDF users: keep TCPDF for current production workloads and migrate in phases. |
| 26 | - Teams seeking modern architecture, Composer-first design, and stronger type-safety should prioritize `tc-lib-pdf`. |
| 27 | |
| 28 | ### Why Migrate to tc-lib-pdf |
| 29 | |
| 30 | - Modern architecture: modular libraries and cleaner component boundaries improve maintainability. |
| 31 | - Better extensibility: new features are easier to add without patching a monolithic legacy core. |
| 32 | - Stronger tooling fit: modern package structure works better with static analysis, CI, and automated tests. |
| 33 | - Lower long-term risk: reduces technical debt tied to legacy APIs and supports ongoing PHP ecosystem evolution. |
| 34 | - Improved delivery speed: teams can implement and ship new PDF capabilities with less friction. |
| 35 | |
| 36 | Migration still requires planning and regression checks to preserve rendering parity for existing documents. |
| 37 | |
| 38 | ### Future Compatibility Possibility |
| 39 | |
| 40 | As a long-term possibility, TCPDF could be refactored to use `tc-lib-pdf` internally as a backend while preserving a practical level of backward compatibility for existing TCPDF integrations. |
| 41 | |
| 42 | This is not part of a committed roadmap and there is no guarantee it will happen. It is documented here only as a potential direction that may be evaluated in the future. |
| 43 | |
| 44 | --- |
| 45 | |
| 46 | ## Overview |
| 47 | |
| 48 | TCPDF is a pure-PHP library for generating PDF documents and barcodes directly in application code. |
| 49 | |
| 50 | It has been widely used across many PHP stacks and still provides a complete feature set for text rendering, page composition, graphics, signatures, forms, and standards-oriented output. |
| 51 | |
| 52 | | | | |
| 53 | |---|---| |
| 54 | | **Package** | `tecnickcom/tcpdf` | |
| 55 | | **Author** | Nicola Asuni <info@tecnick.com> | |
| 56 | | **License** | [GNU LGPL v3](https://www.gnu.org/copyleft/lesser.html) (see [LICENSE.TXT](LICENSE.TXT)) | |
| 57 | | **Website** | <http://www.tcpdf.org> | |
| 58 | | **Source** | <https://github.com/tecnickcom/TCPDF> | |
| 59 | |
| 60 | --- |
| 61 | |
| 62 | ## Features |
| 63 | |
| 64 | ### Text & Fonts |
| 65 | - UTF-8 Unicode and right-to-left (RTL) language support |
| 66 | - TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1, and CID-0 fonts |
| 67 | - Font subsetting |
| 68 | - Text hyphenation, stretching, spacing, and rendering modes (fill/stroke/clipping) |
| 69 | - Automatic line breaks, page breaks, and justification |
| 70 | |
| 71 | ### Layout & Content |
| 72 | - Standard and custom page formats, margins, and measurement units |
| 73 | - XHTML + CSS rendering, JavaScript, and forms |
| 74 | - Automatic headers and footers |
| 75 | - Multi-column mode and no-write page regions |
| 76 | - Bookmarks, named destinations, and table of contents |
| 77 | - Automatic page numbering, page groups, move/delete pages, and undo transactions |
| 78 | |
| 79 | ### Images, Graphics & Color |
| 80 | - Native JPEG, PNG, and SVG support |
| 81 | - Geometric drawing primitives and transformations |
| 82 | - Support for GD image formats (`GD`, `GD2`, `GD2PART`, `GIF`, `JPEG`, `PNG`, `BMP`, `XBM`, `XPM`) |
| 83 | - Additional formats via ImageMagick (when available) |
| 84 | - JPEG/PNG ICC profiles, grayscale/RGB/CMYK/spot colors, and transparencies |
| 85 | |
| 86 | ### Security, Standards & Advanced Output |
| 87 | - Encryption up to 256-bit and digital signature certifications |
| 88 | - PDF annotations (links, text, and file attachments) |
| 89 | - 1D and 2D barcode support (including CODE 128, EAN/UPC, Datamatrix, QR Code, PDF417) |
| 90 | - XObject templates and layers with object visibility controls |
| 91 | - PDF/A-1b support |
| 92 | |
| 93 | --- |
| 94 | |
| 95 | ## Requirements |
| 96 | |
| 97 | - PHP 7.1 or later |
| 98 | - `ext-curl` |
| 99 | |
| 100 | Optional extensions for richer output in some workflows: `gd`, `zlib`, `imagick`. |
| 101 | |
| 102 | --- |
| 103 | |
| 104 | ## Third-Party Fonts |
| 105 | |
| 106 | This library may include third-party font files released under different licenses. |
| 107 | |
| 108 | PHP metadata files under [fonts](fonts) are covered by the TCPDF license (GNU LGPL v3). They contain font metadata and can also be generated using TCPDF font utilities. |
| 109 | |
| 110 | Original binary TTF files are renamed for compatibility and compressed with PHP `gzcompress` (the `.z` format). |
| 111 | |
| 112 | | Prefix | Source | License | |
| 113 | |---|---|---| |
| 114 | | `free*` | [GNU FreeFont](https://www.gnu.org/software/freefont/) | GNU GPL v3 | |
| 115 | | `pdfa*` | Derived from GNU FreeFont | GNU GPL v3 | |
| 116 | | `dejavu*` | [DejaVu Fonts](http://dejavu-fonts.org) | Bitstream/DejaVu terms | |
| 117 | | `ae*` | [Arabeyes.org](http://projects.arabeyes.org/) | GNU GPL v2 | |
| 118 | |
| 119 | For full details, see the bundled notices in the corresponding subdirectories under [fonts](fonts). |
| 120 | |
| 121 | --- |
| 122 | |
| 123 | ## ICC Profile |
| 124 | |
| 125 | TCPDF includes `sRGB.icc` from the Debian [`icc-profiles-free`](https://packages.debian.org/source/stable/icc-profiles-free) package. |
| 126 | |
| 127 | --- |
| 128 | |
| 129 | ## Contact |
| 130 | |
| 131 | Nicola Asuni <info@tecnick.com> |
| 132 |