Getting started
Install
Render a template
<?php
use LibreSign\XObjectTemplate\Dto\CompileRequest;
use LibreSign\XObjectTemplate\XObjectTemplateCompiler;
$compiler = new XObjectTemplateCompiler();
$result = $compiler->compile(new CompileRequest(
html: '<div style="font-size:12;color:#111111">Signed by {{ name }}</div>',
width: 240.0,
height: 84.0,
context: ['name' => 'Alice'],
));
// $result->contentStream
// $result->resources
// $result->bbox
Validate the examples
Run the integration scenario for examples to execute every example file and verify the generated artifacts:
This command also materializes additional reusable integration scenarios under
build/examples/integration-scenarios/.
Visible stamp scenarios (including GovBR-like) are also materialized under
build/examples/visible-stamp/.