本文整理匯總了PHP中mPDF::writeBarcode方法的典型用法代碼示例。如果您正苦於以下問題:PHP mPDF::writeBarcode方法的具體用法?PHP mPDF::writeBarcode怎麽用?PHP mPDF::writeBarcode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mPDF
的用法示例。
在下文中一共展示了mPDF::writeBarcode方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetBookletPages
$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++) {
示例2: mPDF
#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 -- //
// ---------------------- //
?>