Result Object

The result object is a simple class that gets returned by the createPdf function or the HtmlToPdfservice class.

$pdf = \Typesetsh\createPdf("Hello World", $resolveUri);

// The version of the PDF file (default 1.6)
$pdf->version = '1.6';

// [Readonly] Number of pages that have been created.

// [Readonly] List of \RuntimeException that raised durring rendering.

// Write PDF to a file

// Return PDF as string
$data = $pdf->asString();

Last updated