Pro API 概覽¶
nextpdf/pro 需要商業授權。所有類別位於 NextPDF\Pro\ 命名空間。
模組索引¶
| 模組 | 命名空間 | 說明 |
|---|---|---|
| Charts | NextPDF\Pro\Charts | 原生向量圖表(9 種類型) |
| Signature LTA | NextPDF\Pro\Signature | PAdES B-LT / B-LTA |
| Compliance | NextPDF\Pro\Compliance | PDF/A-4 生成與驗證 |
| Optimizer | NextPDF\Pro\Optimizer | PDF 體積最佳化 |
| Prisma | NextPDF\Pro\Accelerator | Prisma Pro 加速引擎 |
| XFA Form | NextPDF\Pro\Form | XFA 動態表單 |
| XFDF | NextPDF\Pro\Form | XFDF 資料匯入匯出 |
| Barcode Extended | NextPDF\Pro\Barcode | GS1-128、DotCode 等 |
| PDF Compare | NextPDF\Pro\Comparison | 兩份 PDF 差異比對 |
| Redaction | NextPDF\Pro\Redaction | 永久性文字塗黑 |
| Watermark | NextPDF\Pro\Watermark | 進階水印(含抗影印) |
| Merge Pro | NextPDF\Pro\Merger | 進階合併(Layer 保留) |
| Extract Pro | NextPDF\Pro\Extraction | 結構化文字提取 |
| Stamp | NextPDF\Pro\Stamp | 文件印章(動態文字) |
| Thumbnail | NextPDF\Pro\Thumbnail | 頁面縮圖生成 |
| Annotation | NextPDF\Pro\Annotation | 注釋(高亮、便條紙) |
| Ruby | NextPDF\Pro\Typography | Ruby 標注 |
| Verify | NextPDF\Pro\Verification | 簽章驗證報告 |
| Table Pro | NextPDF\Pro\Layout | 進階表格(合併儲存格) |
| Layer | NextPDF\Pro\Layer | OCG 圖層管理 |
| Metadata | NextPDF\Pro\Metadata | XMP 元資料編輯 |
圖表模組(Charts)¶
namespace NextPDF\Pro\Charts;
final class ChartRenderer
{
public static function forDocument(Document $document): self
public function render(
ChartInterface $chart,
Position $position,
Dimension $dimension,
): void
}
PAdES B-LTA 模組¶
namespace NextPDF\Pro\Signature;
final class LtaOrchestrator
{
public static function create(
SigningCertificate $certificate,
TimestampAuthority $tsa,
RevocationEmbedder $revocation,
): self
public function sign(Document $document, SignatureAppearance $appearance = SignatureAppearance::INVISIBLE): Document
}
final class TimestampAuthority
{
public static function create(
string $url,
?string $policyOid = null,
?string $username = null,
?string $password = null,
int $timeout = 30,
): self
}
final class RevocationEmbedder
{
public static function create(): self
public function withOcspFallback(bool $enabled): self
public function withCrlFallback(bool $enabled): self
public function withCacheTtl(int $seconds): self
}
PDF/A-4 合規模組¶
namespace NextPDF\Pro\Compliance;
final class PdfA4Converter
{
public static function create(): self
/**
* @param 'PDF/A-4'|'PDF/A-4e'|'PDF/A-4f' $conformance
*/
public function convert(Document $document, string $conformance = 'PDF/A-4'): Document
}
PDF 最佳化器(Optimizer)¶
namespace NextPDF\Pro\Optimizer;
final class PdfOptimizer
{
public static function create(): self
public function optimize(
Document $document,
OptimizationProfile $profile = OptimizationProfile::BALANCED,
): OptimizationResult
}
enum OptimizationProfile
{
case SCREEN;
case EBOOK;
case BALANCED;
case PRINT;
case PREPRESS;
public static function custom(
ImageOptimizationConfig $images,
FontOptimizationConfig $fonts,
bool $streams = true,
bool $metadata = true,
): self
}
Prisma Pro 加速引擎¶
namespace NextPDF\Pro\Accelerator;
final class PrismaClient
{
public static function create(PrismaConfig $config = new PrismaConfig()): self
public function isAvailable(): bool
public function version(): string
}