Skip to content

Pro 套件總覽

Pro · Commercial
Pro — Commercial License Required
Pro 套件需要商業授權:每個應用程式 $1,000 USD,依主版本永久授權。

Pro 套件(yeeefang/tcpdf-nextpro)在 Core 的基礎上擴充企業級安全與合規功能,涵蓋數位簽章、長期驗證、歸檔標準與硬體安全模組等進階需求。

功能比較

功能CorePro
PDF 2.0 產生YesYes
AES-256 加密YesYes
PAdES B-B 簽章YesYes
PAdES B-T / B-LT / B-LTA--Yes
長期驗證(LTV)--Yes
PDF/A-4 歸檔--Yes
PDF/UA 無障礙--Yes
HSM 整合(PKCS#11)--Yes
憑證透明度--Yes
RSASSA-PSS 簽章--Yes

安裝

bash
composer require yeeefang/tcpdf-nextpro

在環境變數中設定授權金鑰:

bash
# .env
TCPDF_PRO_LICENSE_KEY=your-license-key

套件內容

模組類別數說明
Security/Signature5PAdES B-B 至 B-LTA 數位簽章
Security/Ltv4長期驗證 — DSS、OCSP、CRL
Security/Timestamp2RFC 3161 時間戳記授權
Security/Encryption2AES-256(AESV3)搭配 SASLprep
Security/Hsm2硬體安全模組(PKCS#11)
Archive5PDF/A-4 合規、XMP 中繼資料
Accessibility3標記式 PDF、結構樹、角色對應

總計:47 個原始碼檔案,橫跨 7 個模組。

命名空間

所有 Pro 類別位於 Yeeefang\TcpdfNext\Pro\ 命名空間下:

Yeeefang\TcpdfNext\Pro\Security\Signature\DigitalSigner
Yeeefang\TcpdfNext\Pro\Security\Signature\CertificateInfo
Yeeefang\TcpdfNext\Pro\Security\Signature\ByteRangeCalculator
Yeeefang\TcpdfNext\Pro\Security\Signature\SignatureAppearance
Yeeefang\TcpdfNext\Pro\Security\Ltv\LtvManager
Yeeefang\TcpdfNext\Pro\Security\Ltv\DssBuilder
Yeeefang\TcpdfNext\Pro\Security\Ltv\OcspClient
Yeeefang\TcpdfNext\Pro\Security\Ltv\CrlFetcher
Yeeefang\TcpdfNext\Pro\Security\Timestamp\TsaClient
Yeeefang\TcpdfNext\Pro\Security\Timestamp\DocumentTimestamp
Yeeefang\TcpdfNext\Pro\Security\Encryption\Aes256Encryptor
Yeeefang\TcpdfNext\Pro\Security\Encryption\SaslPrep
Yeeefang\TcpdfNext\Pro\Security\Hsm\HsmSigner
Yeeefang\TcpdfNext\Pro\Security\Hsm\Pkcs11Bridge
Yeeefang\TcpdfNext\Pro\Archive\PdfAManager
Yeeefang\TcpdfNext\Pro\Archive\XmpMetadata
Yeeefang\TcpdfNext\Pro\Archive\OutputIntent
Yeeefang\TcpdfNext\Pro\Archive\IccProfile
Yeeefang\TcpdfNext\Pro\Archive\PdfAVersion
Yeeefang\TcpdfNext\Pro\Accessibility\StructureTreeManager
Yeeefang\TcpdfNext\Pro\Accessibility\RoleMap

快速範例

php
use Yeeefang\TcpdfNext\Core\Document;
use Yeeefang\TcpdfNext\Pro\Security\Signature\DigitalSigner;
use Yeeefang\TcpdfNext\Pro\Security\Signature\CertificateInfo;
use Yeeefang\TcpdfNext\Pro\Security\Ltv\LtvManager;
use Yeeefang\TcpdfNext\Pro\Security\Timestamp\TsaClient;
use Yeeefang\TcpdfNext\Contracts\Enums\SignatureLevel;

$pdf = Document::create()
    ->addPage()
    ->font('Helvetica', size: 12)
    ->text('企業級簽署文件');

$cert = CertificateInfo::fromPkcs12('/certs/signer.p12', 'passphrase');
$tsa  = new TsaClient('https://tsa.example.com/timestamp');

$signer = new DigitalSigner($cert);
$signer->level(SignatureLevel::PAdES_B_LTA);
$signer->timestampAuthority($tsa);

LtvManager::embed($pdf, $signer);

$pdf->save('/output/signed.pdf');

下一步

以 LGPL-3.0-or-later 授權釋出。