PHPackages                             jeidison/signer-php - 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. jeidison/signer-php

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

jeidison/signer-php
===================

Open-source PHP library for PDF digital signing with multiple signatures, RFC3161 timestamping, PAdES profiles, and PDF protection

v1.0.1(2mo ago)132.1k3MITPHPPHP ^8.2CI passing

Since Oct 10Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/jeidison/signer-php)[ Packagist](https://packagist.org/packages/jeidison/signer-php)[ RSS](/packages/jeidison-signer-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (14)Versions (4)Used By (0)

Signer PHP (PDF Module)
=======================

[](#signer-php-pdf-module)

PHP library to digitally sign PDFs using A1 certificates (`.pfx/.p12`) with a simple, developer-friendly API.

What problem it solves
----------------------

[](#what-problem-it-solves)

If you need backend PDF signing with cryptographic validity, this library provides a direct flow to:

- apply digital signatures to PDF files
- include signer metadata
- add visible signatures (image)
- apply RFC3161 timestamping (TSA)
- sign the same PDF multiple times (incremental flow)

Main features
-------------

[](#main-features)

- PKCS#12 (`.pfx/.p12`) digital signature
- Fluent builder API (`Signer::signer()`)
- Invisible signature
- Visible signature with background image (`PNG`/`JPEG`), contain-scaled and centred
- Visible signature with drawn signature image on a configurable sub-area of the bbox
- Visible signature with custom PDF content stream (text, graphics) in the n2 layer
- Automatic default visible appearance (built-in fallback)
- Signature metadata (`name`, `contactInfo`, `reason`, `location`)
- DocMDP certification (levels 1, 2 and 3)
- Brazil policy mode (`br-iti`) signing preset
- PAdES Baseline-B profile mode (SubFilter `ETSI.CAdES.detached`)
- PAdES Baseline-T profile mode (PAdES-B + required timestamp)
- PAdES Baseline-LT profile mode (PAdES-T + embedded DSS/Certs)
- PAdES Baseline-LTA profile mode (PAdES-LT + extra archival timestamp)
- Multiple signatures in the same document
- Optional RFC3161 timestamping
- RFC3161 timestamping with public default TSA when enabled (`withTimestamp()`)
- PDF permission protection (for example, block content copying)
- Validation of existing digital signatures in PDF files

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

[](#requirements)

- PHP `^8.2`
- `ext-openssl`
- `ext-curl`
- recommended: `ext-zlib` and `ext-fileinfo`

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

[](#installation)

Install with Composer:

```
composer require jeidison/signer-php
```

Usage
-----

[](#usage)

### 1) Basic signature

[](#1-basic-signature)

```
