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.
$pdf->pageCount;
// [Readonly] List of \RuntimeException that raised durring rendering.
$pdf->issues;
// Write PDF to a file
$pdf->toFile('test.pdf');
// Return PDF as string
$data = $pdf->asString();
Last updated