Download the PHP package lsnepomuceno/signet-pdf without Composer

On this page you can find all versions of the php package lsnepomuceno/signet-pdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package signet-pdf

Signet PDF

Sign and verify PDF signatures in PHP, from PKCS#12 or PEM, with PAdES profiles,
long-term validation and cryptographic verification. No framework.

Latest version Downloads Tests License

PHP PAdES PHPStan Type coverage

Documentation  ·  Getting started  ·  Public API  ·  Upgrading  ·  Changelog  ·  Signed samples


Installation

There is nothing to register: no service provider, no facade, no container and no global state. src/Signet.php wires the default object graph by hand, and every class can also be built directly, which is what lets an application register them in its own container instead.

openssl on PATH is not required to sign. It is used only for verifying a signature and for reading a legacy PFX file, and vendor/bin/signet check reports what the environment can actually do before anything is signed.

Signing

A revision is appended, never a rebuilt document, so the original bytes survive and an earlier signature stays valid. That is what keeps annotations, form fields and every previous signature intact, and it is the single most important behaviour in the package.

Verifying

isValid() means the CMS actually verifies, not that a subject line could be parsed. Validation makes no network request and cannot be made to: revocation is evaluated from the material the document itself carries. Whether to accept the signer is a separate question, answered against roots you name.

Entry points

The builder above is the primary API. For callers that do not need it, Signet offers one-shot entry points, and each is covered in the guide:

signFromFile() sign with a PKCS#12 bundle on disk
signFromPem() sign with PEM, key combined or separate
validate() a Data\SignatureReport for a document
signatureFields() the signature fields a document declares, signed or not
addSignatureField() lay out an empty field, so a template can be prepared here rather than in a word processor
complete() finish a signature prepare() set up, with a CMS made somewhere else
extendArchive() a further archive timestamp, with no certificate involved
encryptCertificate() seal a bundle and its password at rest
decryptCertificate() open what was sealed
vault() the encrypter behind both, to bring your own scheme
icpBrasil() conformance of a Brazilian certificate against its own specification

It is a convenience over the parts, never a layer in front of them. Nothing in src/ depends on it, every class it builds can be built directly, and an application with its own container should register those classes and ignore the entry point entirely.

What it does

PKCS#12 and PEM .pfx, .p12, or a PEM certificate with the key beside it or in its own file
Incremental signing a revision is appended, never a rebuilt document, so earlier signatures and form fields survive
PAdES profiles legacy through pades-b-lta, with RFC 3161 timestamps and long-term validation
Visible seals rendered from the certificate or drawn from your own artwork, on the page you name
Template fields fills a signature field a contract already carries, instead of appending beside it
Certification ISO 32000-1 §12.8.2.2 DocMDP, plus field locks that later signatures honour
Encrypted documents AES-128 and AES-256, signed and re-encrypted under the document's own key
Two-phase signing prepare() here, sign on a token, an HSM or a cloud service, complete() here: the private key never has to be in this process
Large documents signing needs a little more than the size of the document, not a multiple of it: a 300 MB file signs in 310 MB
A signing receipt what was signed, at what profile, when, by whom, with the digest of the document before and after
Archive maintenance refresh a B-LTA archive with no certificate and no key material involved, from PHP or from a cron entry
Verification the CMS is actually verified, with the timestamp, the profile and revocation reported
ICP-Brasil identity CPF, CNPJ (including the alphanumeric one) and the rest, read from the certificate rather than parsed out of a name
ICP-Brasil policies a signature declares the policy it was made under, and an archival one carries the policy document and ITI's published list inside the file
PDF/A a signed document stays conformant, measured with veraPDF rather than assumed
PDF/UA measured too: an accessible document stays conformant, seal or not, because the widget joins the structure tree and carries a description

Documentation

Everything else is at lsnepomuceno.github.io/signet-pdf: twenty-one pages covering profiles and timestamps, visible seals, signature fields, certification, encrypted documents, validation, trust, ICP-Brasil, the command line, testing your own code, every exception this package raises and every limit it still has, plus the changelog and the upgrade guide. The earlier lines are archived at /v2/ and /v1/.

Getting started  ·  Public API  ·  Troubleshooting  ·  Why the design is what it is

Compatibility

Package PHP Notes
^3 8.4.1 – 8.5 the current line, and what this page documents
^2 8.4.1 – 8.5 the previous line; UPGRADE.md is the path across
^1 8.4.1 – 8.5 archived; upgrading crosses 2.x first

ext-openssl, ext-sodium, ext-gd, ext-mbstring, ext-zlib, ext-fileinfo and ext-json are required. The openssl binary on PATH is needed only by the legacy certificate reader and by the default signature verifier, which can be swapped for one that starts no process.

The floor is 8.4.1 rather than 8.4 because symfony/process 8.1.0 requires it, so a platform of 8.4.0 cannot resolve this package at all (docs/decisions/0005-php-and-laravel-floor.md).

Using Laravel? lsnepomuceno/laravel-a1-pdf-sign wraps a signing core with a service provider, a facade and Artisan commands. The two are separate implementations sharing a lineage rather than a core and an integration; UPGRADE.md maps the surface across.

Verified, not asserted

Signed output is checked against tools that were not written here, because a validator sharing its assumptions with the signer proves very little: veraPDF decides PDF/A and PDF/UA, pyHanko enforces /DocMDP, qpdf checks structure, the Arlington PDF Model checks the emitted objects against the specification's own grammar, EU DSS recomputes the digest a signature declares for its policy and reads the PAdES baseline level the output reaches, and poppler's pdfsig has caught defects the suite passed straight through.

The last one earned its place by seeing what the others could not. Every ICP-Brasil policy digest this package shipped was the hash of the wrong artefact, and pdfsig, pyHanko and Demoiselle all reported the resulting document as valid, correctly: none of them resolves the policy document, so none of them ever compares.

samples/ holds one signed document per profile plus the awkward cases, indexed and explained in Sample documents. Which test exercises which tool, and why, is in Standards and instruments.

Contributing

Patches are expected to come with tests. composer check runs everything CI runs: Pint, PHPStan at level max with no baseline, a dependency report, the manifest normaliser and the suite. Everything runs in Docker, because the floor is PHP 8.4.

See CONTRIBUTING.md.

Security

Found a vulnerability? Please follow SECURITY.md rather than opening a public issue.

Licence

MIT. See LICENSE.md.


All versions of signet-pdf with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4.1 <8.6
ext-fileinfo Version *
ext-gd Version *
ext-json Version *
ext-mbstring Version *
ext-openssl Version *
ext-sodium Version *
ext-zlib Version *
composer-runtime-api Version ^2.2
intervention/image Version ^4.3
psr/log Version ^3.0
symfony/console Version ^8
symfony/http-client Version ^8
symfony/http-client-contracts Version ^3.6
symfony/process Version ^8
symfony/uid Version ^8
tecnickcom/tc-lib-pdf-sign Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lsnepomuceno/signet-pdf contains the following files

Loading the files please wait ...