PHPackages                             tecnickcom/tc-lib-pdf-image - 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. tecnickcom/tc-lib-pdf-image

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

tecnickcom/tc-lib-pdf-image
===========================

PHP library containing PDF Image methods

3.11.1(1w ago)6720.0k↓16.7%51LGPL-3.0-or-laterPHPPHP &gt;=8.2CI passing

Since Apr 10Pushed 1w ago1 watchersCompare

[ Source](https://github.com/tecnickcom/tc-lib-pdf-image)[ Packagist](https://packagist.org/packages/tecnickcom/tc-lib-pdf-image)[ Docs](https://tcpdf.org)[ GitHub Sponsors](https://github.com/sponsors/tecnickcom)[ RSS](/packages/tecnickcom-tc-lib-pdf-image/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (19)Versions (112)Used By (1)

tc-lib-pdf-image
================

[](#tc-lib-pdf-image)

> Image import and embedding utilities for PDF streams.

[![Latest Stable Version](https://camo.githubusercontent.com/dffc90773bd04b93686ac9d6cd53b10600aed15ca1823f910314400c76d7e0cb/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d696d6167652f76657273696f6e)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-image)[![Build](https://github.com/tecnickcom/tc-lib-pdf-image/actions/workflows/check.yml/badge.svg)](https://github.com/tecnickcom/tc-lib-pdf-image/actions/workflows/check.yml)[![Coverage](https://camo.githubusercontent.com/3b93a7815f7b932c12c84153e7399913f989a2808c89d1769196c032f3f2df12/68747470733a2f2f636f6465636f762e696f2f67682f7465636e69636b636f6d2f74632d6c69622d7064662d696d6167652f67726170682f62616467652e7376673f746f6b656e3d37524833424448544c32)](https://codecov.io/gh/tecnickcom/tc-lib-pdf-image)[![License](https://camo.githubusercontent.com/3816d84a2e048878b19dd342fc472902836803f4f096b932f70d6fdd6e233aa6/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d696d6167652f6c6963656e7365)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-image)[![Downloads](https://camo.githubusercontent.com/0fca47dd50ecae5a48855fc86eb82c65df2df877d8a0611636adf164e7b4a988/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d696d6167652f646f776e6c6f616473)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-image)

[![Sponsor on GitHub](https://camo.githubusercontent.com/dd89cb32d6e7ff9dbb0fa7ce84923567358b220feb9198b3720beabc3153da6a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73706f6e736f722d6769746875622d4541344141412e7376673f6c6f676f3d67697468756273706f6e736f7273266c6f676f436f6c6f723d7768697465)](https://github.com/sponsors/tecnickcom)

> 💖 Part of the [tc-lib-pdf / TCPDF](https://github.com/tecnickcom/tc-lib-pdf) ecosystem (100M+ installs). [Sponsor its maintenance →](https://github.com/sponsors/tecnickcom)

---

Overview
--------

[](#overview)

`tc-lib-pdf-image` handles image import, conversion, and output structures used by PDF generators.

The library isolates image pipeline concerns such as format handling, normalization, and object generation for PDF embedding. Keeping this logic separate helps reduce complexity in document-level code and makes image behavior easier to validate and maintain.

**Namespace**`\Com\Tecnick\Pdf\Image`**Author**Nicola Asuni **License**[GNU LGPL v3](https://www.gnu.org/copyleft/lesser.html) - see [LICENSE](LICENSE)**API docs****Packagist**---

Features
--------

[](#features)

### Import Support

[](#import-support)

- Native handling for PNG and JPEG
- Additional format handling through GD processing paths
- Transparency and palette-related metadata handling

### PDF Integration

[](#pdf-integration)

- Image caching keys for repeated assets
- Alternate image support for print/display contexts
- Output helpers for embedding image objects

---

Requirements
------------

[](#requirements)

- PHP 8.2 or later
- Extensions: `gd`, `zlib`
- Composer

---

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

[](#installation)

```
composer require tecnickcom/tc-lib-pdf-image
```

---

Quick Start
-----------

[](#quick-start)

```
