sdk
PHP SDK
Runtime: PHP 8.1+
Install
composer require snappdf/sdk
Quickstart
use SnapPdf\SnapPdf;
$snap = new SnapPdf(apiKey: getenv('SNAPPDF_API_KEY'));
$r = $snap->pdf->merge(files: [
file_get_contents('a.pdf'),
file_get_contents('b.pdf'),
]);
file_put_contents('out.pdf', $r['pdf']);Features
- · Promoted constructor params, strict types, readonly properties
- · Native cURL transport — no heavy Guzzle dependency
- · PSR-4 autoloading
- · Webhook verifySignature static helper
Reference
Full API reference lives at /docs. Source + examples on GitHub.