Use cases
Embed CII XML into an existing PDF/A-3
Convert a business PDF into EN16931-compliant Factur-X
If you already have a PDF invoice generator (custom business template, ERP), Scell.io can convert the PDF into Factur-X by attaching an EN16931-compliant CII D16B XML as a PDF/A-3 file attachment. Endpoint `POST /api/v1/invoices/embed`: you provide the source PDF (multipart) + structured data (JSON) and receive a hybrid PDF/A-3. Scell.io handles PDF/A-3 conversion (colours, embedded fonts, XMP metadata), XML generation and attachment. Ideal for migrating a legacy invoicing system to 2026 compliance without rebuilding the template engine.
Key facts
- Input: arbitrary PDF + structured JSON data
- Output: hybrid PDF/A-3 with attached `factur-x.xml`
- Automatic PDF → PDF/A-3 conversion (fonts, ICC colours)
- Factur-X v1.0.07 compliant XMP metadata
- Supported profiles: MINIMUM, BASIC, EN16931, EXTENDED
- Built-in EN16931 Schematron validation
Code example
use Scell\Sdk\ScellClient;
$scell = new ScellClient(getenv('SCELL_SECRET_KEY'));
$pdfStream = fopen('/var/exports/INV-2026-001.pdf', 'rb');
$facturX = $scell->invoices()->embed([
'pdf' => $pdfStream,
'data' => [
'profile' => 'EN16931',
'invoice_number' => 'INV-2026-001',
'issue_date' => '2026-05-03',
'seller' => ['siret' => '12345678901234', 'name' => 'Ma SAS'],
'buyer' => ['siret' => '98765432109876', 'name' => 'Client SARL'],
'lines' => [['description' => 'Prestation', 'quantity' => 1, 'unit_price' => 1000.00, 'vat_rate' => 20]],
],
]);
file_put_contents('/var/exports/INV-2026-001.facturx.pdf', $facturX->getBody());