jsignpdf / jsignpdf-php
jsignpdf-php
Installs: 79 726
Dependents: 0
Suggesters: 0
Security: 0
Stars: 21
Watchers: 3
Forks: 4
Open Issues: 1
Requires
- php: ^7.4|^8.0
- ext-json: *
- ext-openssl: *
Requires (Dev)
- phpunit/phpunit: ^9.5
- dev-master
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.6
- 0.5
- 0.4
- 0.3
- 0.2
- 0.1
- dev-fix/set-user-language-hardcoded
- dev-fix/works-with-unicode-password
- dev-fix/escape-password
- dev-fix/prevent-error-when-read-old-cert
- dev-chore/remove-unused-file
- dev-fix/tests
- dev-bugfix/get-version
- dev-bugfix/redirect-strerr-to-stdout
- dev-bugfix/prevent-handle-invalid-output
- dev-develop
This package is auto-updated.
Last update: 2024-12-12 16:47:45 UTC
README
This package is only wrapper of JSignPdf to use in PHP
Installation:
$ composer require jeidison/jsignpdf-php
Examples
use Jeidison\JSignPDF\JSignPDF; use Jeidison\JSignPDF\Sign\JSignParam; $param = JSignParam::instance(); $param->setCertificate(file_get_contents('/path/to/file/certificate.pfx')); $param->setPdf(file_get_contents('/path/to/file/pdf_to_sign.pdf')); $param->setPassword('certificate_password'); $jSignPdf = new JSignPDF($param); $fileSigned = $jSignPdf->sign(); file_put_contents('/path/to/file/file_signed.pdf', $fileSigned);
With Java Installed:
$param->setIsUseJavaInstalled(true);
With standalone Java:
$param->setJavaPath('/path/to/bin/java');
With JSignPDF bin:
$param->setjSignPdfJarPath('/path/to/jsignpdf');
Without JSignPDF bin:
composer require jsignpdf/jsignpdf-bin
File signed as base64:
$param->setIsOutputTypeBase64(true);
Change temp directory:
$param->setTempPath('/path/temp/to/sign/files/');
Change parameters of JSignPDF:
$param->setJSignParameters("-a -kst PKCS12 -ts https://freetsa.org/tsr");