PHPackages                             kampak/libsignpdf - 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. kampak/libsignpdf

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

kampak/libsignpdf
=================

This is a library for pdf signing

02PHP

Since Feb 24Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

LibSignPDF
==========

[](#libsignpdf)

1. [What is LibSignPDF?](#what-is-podofo)
2. [Requirements](#requirements)
3. [Development quickstart](#development-quickstart)
4. [Authors](#authors)

What is LibSignPDF?
-------------------

[](#what-is-libsignpdf)

LibSignPDF is a library to create signature annotation on PDF.

LibSignPDF provides a signature annotation for invisible signature and visible signature. This library also support PAdES signature and multiple signature. This library not provide CMS. The CMS havee to provide in another system.

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

[](#requirements)

To build LibSignPDF lib you'll need:

- qpdf

Development quickstart
----------------------

[](#development-quickstart)

LibSignPDF can be used on various operating systems because it is compiled into binary code that can be executed directly by the machine. LibSignPDF is created using the rust programming language which is then compiled into a shared library.

> **Warning**: LibSignPDF is known to be working in cross-compilation toolchains (eg. MacOS/Linux/Windows) but in usage still need qpdf package because the qpdf is not static linking when it compiled.

### Install package

[](#install-package)

From the composer project run:

```
composer require kampak/libsignpdf

```

### Example usage

[](#example-usage)

This is an example code to use LibSignPDF library

```
use Kampak\LibSignPDF\SignPDF;

// This is the parameters that you need for generating CMS
$options = [
    'email' => "test@libsignpdf.com",
    'password' => "P@ssw0rd"
];

function signDigestFunction($digest, $options = []) {

    // START YOUR CODE
    // Please insert your code to get cms by sign the digest
    $yourCMS = "get_your_cms_from_your_server_by_sign_the_digest";

    // END YOUR CODE
    $buffer = FFI::new("char[" . (strlen($yourCMS) + 1) . "]", false);
    FFI::memcpy($buffer, $yourCMS, strlen($yourCMS));
    $buffer[strlen($yourCMS)] = "\0";
    $response = FFI::new("char *", false);
    $response = FFI::addr($buffer[0]);
    return $response;
}

// Create an instance of PDFSigner
$signer = new SignPDF("signDigestFunction", $options);

// Sign the PDF
$inputFile = "your_input_pdf_path";
$outputFile = "your_output_pdf_path";
$visualizationFile = "your_image_visualization_path";

$signer->signPDF(
    $inputFile, // input file
    $outputFile, // output file
    $visualizationFile, // visualization file
    "https://example.com", // url for QRCode
    1, // page will be place the signature
    1, // isPades signature
    0, // type od signature (0 for invisible, 1 for visible image)
    100.0, // x position on pdf for place visualization of signature (start on bottom left)
    200.0, // y position on pdf for place visualization of signature (start on bottom left)
    300.0, // width of visualization for place signature (start on bottom left)
    400.0 // height of visualization for place signature (start on bottom left)
);

```

Authors
-------

[](#authors)

> **Warning**: Please don't use personal email addresses for technical support inquries, but create github [issues](https://github.com/libsignpdf/libsignpdf-php/issues) instead.

LibSignPDF is currently developed and maintained by [LibSignPDF](mailto:libsignpdf@gmail.com), together with LibSignPDF and others. See the file

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![sebariskodedev](https://avatars.githubusercontent.com/u/187636795?v=4)](https://github.com/sebariskodedev "sebariskodedev (6 commits)")

### Embed Badge

![Health badge](/badges/kampak-libsignpdf/health.svg)

```
[![Health](https://phpackages.com/badges/kampak-libsignpdf/health.svg)](https://phpackages.com/packages/kampak-libsignpdf)
```

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.2k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

426.1M30](/packages/setasign-tfpdf)[aspera/xlsx-reader

Spreadsheet reader library for XLSX files

52742.2k5](/packages/aspera-xlsx-reader)

PHPackages © 2026

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