<?php

$html = file_get_contents("/home/ogosmsse/public_html/dynamicapi/53p79ut7/autoinvoice/template.html");



$replaceArray = array(
    array("/{invoice_id}/","/{receiver_physical_address}/","/{units}/","/{unit_price}/","/{total_price}/","/{sent_date}/","/{total_price2}/","/{trstr}/"),
    array($invoice_id,$receiver_physical_address,$units,$unit_price,$total_price,$nowdigit,$total_price2,$istr)
);
$html = preg_replace($replaceArray[0],$replaceArray[1],$html);



include("mpdf6.0/mpdf.php");

$mpdf=new mPDF('c'); 

$mpdf->WriteHTML($html);
$mpdf->Output("$saveas","F");
//exit;