/*$name = 'Tran Hieu Nhan'; $course = 'PMP® Exam Preparation'; $img_signature1 = '<img src="../public/mauBang/sign1.png" />'; $logo_signature1 = '<img src="../public/mauBang/logo1.png" />'; $name_signature1 = 'Nguyen Binh Phuong, MBA, PMP®'; $position_signature1 = 'Instructor'; $img_signature2 = '<img src="../public/mauBang/sign2.png" />'; $logo_signature2 = '<img src="../public/mauBang/logo2.png" />'; $name_signature2 = 'Nguyen Huu Song Phuong'; $position_signature2 = 'President and Chief Executive Officer'; $pdu = '30'; $code = '3AJA789'; $date = date('F d, Y');*/ //instantiate and use the dompdf class $dompdf = new Dompdf(); $dompdf->set_option('isHtml5ParserEnabled', true); //html $html = file_get_contents('../public/mauBang/file_html_img.html'); $html = str_replace('{_name}', $name, $html); $html = str_replace('{_course}', $course, $html); $html = str_replace('{_img_signature1}', $img_signature1, $html); $html = str_replace('{_logo_signature1}', $logo_signature1, $html); $html = str_replace('{_name_signature1}', $name_signature1, $html); $html = str_replace('{_position_signature1}', $position_signature1, $html); $html = str_replace('{_img_signature2}', $img_signature2, $html); $html = str_replace('{_logo_signature2}', $logo_signature2, $html); $html = str_replace('{_name_signature2}', $name_signature2, $html); $html = str_replace('{_position_signature2}', $position_signature2, $html); $html = str_replace('{_pdu}', $pdu, $html); $html = str_replace('{_code}', $code, $html); $html = str_replace('{_date}', $date, $html);