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

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

tecnickcom/tc-lib-pdf-encrypt
=============================

PHP library to encrypt data for PDF

2.1.34(2mo ago)9780.2k—10%65LGPL-3.0-or-laterPHPPHP &gt;=8.1CI passing

Since May 6Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/tecnickcom/tc-lib-pdf-encrypt)[ Packagist](https://packagist.org/packages/tecnickcom/tc-lib-pdf-encrypt)[ Docs](http://www.tecnick.com)[ Fund](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)[ RSS](/packages/tecnickcom-tc-lib-pdf-encrypt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (97)Used By (5)

tc-lib-pdf-encrypt
==================

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

*PHP library to encrypt data for PDF*

[![Latest Stable Version](https://camo.githubusercontent.com/1259e6e87a313025fc003b213d26fb3894e67c5a2bfe6286a5dab14fbec410bb/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d656e63727970742f76657273696f6e)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-encrypt)[![Build](https://github.com/tecnickcom/tc-lib-pdf-encrypt/actions/workflows/check.yml/badge.svg)](https://github.com/tecnickcom/tc-lib-pdf-encrypt/actions/workflows/check.yml/badge.svg)[![Coverage](https://camo.githubusercontent.com/9c559d688f54b836459d116529e7e437ab3a0aca99dbb1bf3caec763c3f70091/68747470733a2f2f636f6465636f762e696f2f67682f7465636e69636b636f6d2f74632d6c69622d7064662d656e63727970742f67726170682f62616467652e7376673f746f6b656e3d5076314d4e4833583376)](https://codecov.io/gh/tecnickcom/tc-lib-pdf-encrypt)[![License](https://camo.githubusercontent.com/fe8131c3faf79fe3922b1f3f4122d77e390d5a8e235c7be1f703f90a41e97089/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d656e63727970742f6c6963656e7365)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-encrypt)[![Downloads](https://camo.githubusercontent.com/4745cfb01a8919b4250e8e04cd8ac10673c2daa14c6bcb68bc83f126d3dc7759/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d656e63727970742f646f776e6c6f616473)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-encrypt)

[![Donate via PayPal](https://camo.githubusercontent.com/e5f561f4f549822da3fbfb75d0be9059a60eac15b1ff7af66500ca1dd4dba91b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d70617970616c2d3837636565622e737667)](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)*Please consider supporting this project by making a donation via [PayPal](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)*

- **category** Library
- **package** \\Com\\Tecnick\\Pdf\\Encrypt
- **author** Nicola Asuni
- **copyright** 2011-2026 Nicola Asuni - Tecnick.com LTD
- **license**  GNU-LGPL v3 (see LICENSE.TXT)
- **link**
- **SRC DOC**

Description
-----------

[](#description)

PHP library to encrypt data for PDF.

The initial source code has been derived from [TCPDF](http://www.tcpdf.org).

### OpenSSL 3

[](#openssl-3)

When using OpenSSL 3 some legacy providers are disabled by default. This will trigger the following error when executing the test:

```
error:0308010C:digital envelope routines::unsupported

```

Legacy provider can be enabled by followign the instructions at: [https://wiki.openssl.org/index.php/OpenSSL\_3.0#Providers](https://wiki.openssl.org/index.php/OpenSSL_3.0#Providers)

```
sudo nano /etc/ssl/openssl.cnf
```

```
   openssl_conf = openssl_init

   [openssl_init]
   providers = provider_sect

   [provider_sect]
   default = default_sect
   legacy = legacy_sect

   [default_sect]
   activate = 1

   [legacy_sect]
   activate = 1
```

An alternative OpenSSL configuration file is provided on and set by default in the Makefile. To overrride the custom OpenSSL configuration file set the following environment variable:

```
export OPENSSL_CONF=/etc/ssl/openssl.cnf
```

Getting started
---------------

[](#getting-started)

This library requires the openssl php extension.

First, you need to install all development dependencies using [Composer](https://getcomposer.org/):

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

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
-----------------

[](#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
-------

[](#example)

Examples are located in the `example` directory.

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

```
make server

```

and point your browser to

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

[](#installation)

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

```
{
    "require": {
        "tecnickcom/tc-lib-pdf-encrypt": "^2.0"
    }
}
```

Or add to an existing project with:

```
composer require tecnickcom/tc-lib-pdf-encrypt ^2.0
```

Packaging
---------

[](#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/Pdf/Encrypt/autoload.php');

```

Developer(s) Contact
--------------------

[](#developers-contact)

\*2026 Nicola Asuni

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance87

Actively maintained with recent releases

Popularity46

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~8 days

Total

96

Last Release

84d ago

Major Versions

1.6.35 → 2.0.62023-11-05

PHP version history (5 changes)1.0.0PHP &gt;=5.3.3

1.1.0PHP &gt;=5.4.0

1.2.0PHP &gt;=5.4

2.0.6PHP &gt;=8.0

2.1.10PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8ee10615840cb28715139809c13ec322d1ccd902506b090469702e5b9d7b88e?d=identicon)[nicolaasuni](/maintainers/nicolaasuni)

---

Top Contributors

[![nicolaasuni](https://avatars.githubusercontent.com/u/1186996?v=4)](https://github.com/nicolaasuni "nicolaasuni (135 commits)")[![valioDOTch](https://avatars.githubusercontent.com/u/800467?v=4)](https://github.com/valioDOTch "valioDOTch (2 commits)")

---

Tags

pdfencryptionaesencryptrc4tc-lib-pdf-encrypt

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/tecnickcom-tc-lib-pdf-encrypt/health.svg)

```
[![Health](https://phpackages.com/badges/tecnickcom-tc-lib-pdf-encrypt/health.svg)](https://phpackages.com/packages/tecnickcom-tc-lib-pdf-encrypt)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[tecnickcom/tcpdf

TCPDF is a PHP class for generating PDF documents and barcodes.

4.5k101.8M473](/packages/tecnickcom-tcpdf)[mpdf/mpdf

PHP library generating PDF files from UTF-8 encoded HTML

4.7k77.1M493](/packages/mpdf-mpdf)[knplabs/knp-snappy

PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.

4.5k68.3M56](/packages/knplabs-knp-snappy)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
