mPDF Manual – mPDF functions

OutputBinaryData()

mPDF ≥ 8.1.2

OutputBinaryData – Finalise the document and return binary data of resulting PDF.

Description

string OutputBinaryData()

Examples

<?php

$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML('Hello World');

$pdfContent = $mpdf->OutputBinaryData();

Changelog

Version Description
8.1.2 Method was added.
Fork me on GitHub