Пример #1
0
    $MyQuery .= "AND QuSession = " . StrSafe_DB($_REQUEST["Session"]) . " ";
}
if ($TmpWhere != "") {
    $MyQuery .= "AND (" . $TmpWhere . ")";
}
$MyQuery .= "ORDER BY QuSession, FirstName, Name, TargetNo ";
//print $MyQuery;exit;
//print '<br><br>'.$MyQuery;exit;
$PosX = array(6, 111, 6, 111);
$PosY = array(6, 6, 155, 155);
//echo $MyQuery;
$Rs = safe_r_sql($MyQuery);
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);