Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JSignPdf/jsignpdf-php

Repository files navigation

jsignpdf-php

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');

With specific Java or JSignPdf version:

$params->getJSignPdfDownloadUrl('the url to download the zip here');
$params->setJavaDownloadUrl('the url to download the .tar.gz here');

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");

Credits

About

This package is only wrapper of JSignPdf to use in PHP

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

Languages

AltStyle によって変換されたページ (->オリジナル) /