I'm using the mPDF library to convert a html into a PDF file. But i need an extra step and that is converting the PDF file to base64. Currently I have this co:
require_once('lib/mpdf.php');
$mpdf = new mPDF('c','A4');
$mpdf->writeHTML('<div>"Hello Wolrd!!"</div>');
echo base64_encode($mpdf);
The require is for the mPDF library, then I create the pdf file and I0m trying to convert it into base 64 but the $mpdf variable is not a string so the function base64_encode is not working. Can someone help me with this. Thanks