本文整理汇总了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 -- //
// ---------------------- //
?>