$mpdf->defaultfooterfontsize = 13; $mpdf->AddPage(); $mpdf->Image('clematis.jpg', 0, 0, 210, 297, 'jpg', '', true, false); // e.g. the last "false" allows a full page picture $mpdf->y = 70; $mpdf->Shaded_box('mPDF Example File', 'Arial', '', 28, '70%', 'DF', 3, '#FFFFFF', '#000044', 10); $mpdf->AddPage(); $mpdf->SetFooter('{PAGENO}'); $mpdf->WriteHTML($html); $mpdf->AddPage('', 'NEXT-EVEN'); $mpdf->SetFooter(); $mpdf->SetAlpha(0.5); $mpdf->Image('clematis.jpg', 0, 0, 210, 297, 'jpg', '', true, false); // e.g. the last "false" allows a full page picture $mpdf->SetAlpha(1); $mpdf->writeBarcode('978-0-9542246-0-8', 1, 130, 230, 1, 0, 3, 3, 4, 4); // Save the pages to a file $mpdf->Output('test.pdf', 'F'); //============================================================== //============================================================== //============================================================== //============================================================== //============================================================== //============================================================== //============================================================== function GetBookletPages($np, $backcover = true) { $lastpage = $np; $np = 4 * ceil($np / 4); $pp = array(); for ($i = 1; $i <= $np / 2; $i++) {
#generate html -> PDF ------------ $out2 = ob_get_contents(); ob_end_clean(); /* margin_left 4 margin_right 4 margin_top 10 margin_bottom 10 margin_header 0 margin_footer 0 */ $mpdf=new mPDF('c', 'A4', '', '', 4, 4, 10, 10, 0, 0); // $mpdf=new mPDF('c', array(105,24), '', '', 1, 1, 1, 1, 0, 0); // $mpdf=new mPDF('utf-8', array(105,24)); $stylesheet = file_get_contents('../../lib/mpdf/r_barcode_buku.css'); // var_dump($stylesheet);exit(); // $mpdf->SetDisplayMode('fullpage'); // $mpdf->list_indent_first_level = 0; $mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text $mpdf->writeBarcode($out); $mpdf->WriteHTML($out); // $mpdf->keep_table_proportions = true; $mpdf->Output(); // } } // ---------------------- // // -- created by epiii -- // // ---------------------- // ?>