コード例 #1
0
ファイル: index.php プロジェクト: brian-nelson/ianseo
if (safe_num_rows($Rs) > 0) {
    $pdf = new LabelPDF();
    // 'P','mm','A4');
    $pdf->AliasNbPages();
    $pdf->setPrintHeader(false);
    $pdf->setPrintFooter(false);
    $pdf->SetMargins(6, 6, 6);
    $pdf->SetAutoPageBreak(false, 15);
    $pdf->SetTextColor(0x0, 0x0, 0x0);
    $i = 0;
    while ($MyRow = safe_fetch($Rs)) {
        $pdf->SetFont($pdf->FontStd, 'B', 18);
        if ($i % 4 == 0) {
            $pdf->AddPage();
            //Crop Mark
            $pdf->Line(2, 148.5, 5, 148.5);
            $pdf->Line(103, 148.5, 107, 148.5);
            $pdf->Line(205, 148.5, 208, 148.5);
            $pdf->Line(105, 2, 105, 5);
            $pdf->Line(105, 146.5, 105, 150.5);
            $pdf->Line(105, 292, 105, 295);
        }
        $myPosX = $PosX[$i % 4];
        $myPosY = $PosY[$i % 4];
        //$pdf->SetFillColor($ColorArray[$MyRow->Session-1][0],$ColorArray[$MyRow->Session-1][1],$ColorArray[$MyRow->Session-1][2]);
        // solo per batumi
        if (!is_null($MyRow->AcColor)) {
            $pdf->SetFillColor(base_convert(substr($MyRow->AcColor, 0, 2), 16, 10), base_convert(substr($MyRow->AcColor, 2, 2), 16, 10), base_convert(substr($MyRow->AcColor, 4, 2), 16, 10));
        } else {
            $pdf->SetFillColor(255, 255, 255);
        }