// ---------------------------------------------------------
$pdf->SetFont('helvetica', '', 12);
$pdf->AddPage();
// Print address
$pdf->SetFont('helvetica', '', 10);
foreach ($REC_ADRESS as $line) {
    $pdf->Cell(0, 0, $line, 0, 1);
}
$pdf->SetFont('helvetica', '', 8);
$pdf->ln();
$pdf->Cell(0, 0, $SPECIAL_NOTE, 0, 1);
$pdf->ln();
// ---------------------------------------------------------
$pdf->SetY(90);
$pdf->SetFont('helvetica', '', 12);
$pdf->Image($HEADER_IMG, $pdf->GetX(), $pdf->GetY(), $W, '', 'png', '', 'T', true, 300, '', false, false, 0, true, false, false);
$pdf->SetY(120);
$pdf->SetFont('helvetica', 'B', 14);
$pdf->Cell(0, 0, "Letter of Attendance", 0, 1);
$pdf->SetY(140);
$pdf->SetFont('helvetica', '', 12);
$pdf->writeHTML($HTML, true, false, true, false, '');
$SIGPOS = 200;
$SIGOFF = 20;
$pdf->SetY($SIGPOS);
$pdf->SetFont('helvetica', '', 12);
$pdf->Cell(0, 0, "Sincerely,", 0, 1);
$pdf->SetY($SIGPOS + 30);
$pdf->Cell(0, 0, $SIGNATURE_IMGPERS[0], 0, 1);
$pdf->SetFont('helvetica', '', 8);
$pdf->Cell(0, 0, $SIGNATURE_IMGPERS[1], 0, 1);
Example #2
0
$ini = 0;
$final = "";
$resto = $ini;
//for ($i=0;$i<=10;$i++)
//{
foreach ($products as $key => $product) {
    $textContenido = '
        <table border="0.2" cellpadding="3" cellspacing="0">
		<tr>
		<td width="70" align="center"><font size="10">' . intval($product->qty) . '</font></td>
		<td width="355"><font size="10">' . $product->notes . '</font></td>
		<td width="97" align="center"><font size="10"> ' . number_format((double) ($product->cost * $product->qty), 2, '.', ',') . '</font></td>
		</tr>
         </table>
		';
    $ini = $pdf->GetY();
    //punto inicial antes de dibujar la siguiente fila
    if ($ini + $resto >= 250.46944444444) {
        $pdf->AddPage('P', 'LETTER');
        $pdf->writeHTMLCell($w = 0, $h = 0, '', '', $textContenido, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
    } else {
        $pdf->writeHTMLCell($w = 0, $h = 0, '', '', $textContenido, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
        $final = $pdf->GetY();
        //punto hasta donde se dibujo la fila
    }
    $resto = $final - $ini;
    //diferencia entre $ini y $final para sacar el tamaño siguiente a dibujar
    //}
}
$texPie = "";
$subtotal = number_format((double) $invoice->importe_total, 2, '.', ',');
Example #3
0
$final = "";
$resto = $ini;
//for ($i=0;$i<=10;$i++)
//{
foreach ($products as $key => $product) {
    $textContenido = '
        <table border="0.2" cellpadding="3" cellspacing="0">
		<tr>
		<td width="70" align="center"><font size="10">' . intval($product->qty) . '</font></td>
		<td width="240"><font size="10">' . $product->notes . '</font></td>
		<td width="115" align="right"><font size="10">' . number_format((double) $product->cost, 2, '.', ',') . '</font></td>
		<td width="97" align="right"><font size="10"> ' . number_format((double) ($product->cost * $product->qty), 2, '.', ',') . '</font></td>
		</tr>
         </table>
		';
    $ini = $pdf->GetY();
    //punto inicial antes de dibujar la siguiente fila
    if ($ini + $resto >= 250.46944444444) {
        $pdf->AddPage('P', 'LETTER');
        $pdf->writeHTMLCell($w = 0, $h = 0, '', '', $textContenido, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
    } else {
        $pdf->writeHTMLCell($w = 0, $h = 0, '', '', $textContenido, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
        $final = $pdf->GetY();
        //punto hasta donde se dibujo la fila
    }
    $resto = $final - $ini;
    //diferencia entre $ini y $final para sacar el tamaño siguiente a dibujar
    //}
}
$texPie = "";
$subtotal = number_format((double) $invoice->importe_total, 2, '.', ',');
Example #4
0
<tr>
<td>
</td>
</tr>
<tr><td></td></tr>  
<tr>
	<td width="520" align="center" style="font-size:8px"><b>"ESTA FACTURA CONTRIBUYE AL DESARROLLO DEL PAIS, EL USO ILICITO DE ESTA SERA SANCIONADO DE ACUERDO A LEY"</b></td>
</tr>
<tr><td></td></tr>

<tr>
	<td width="460" align="center" style="font-size:10px">"Ley Nº 453: Está prohibido importar, distribuir o comercializar productos expirados o prontos a expirar"</td>
</tr>
</table>
';
if ($i == 17 || $i == 18 || $i == 19 || $i == 20) {
    $pdf->writeHTMLCell($w = 0, $h = 0, '', $pdf->GetY() + 25, $final, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
} else {
    $pdf->writeHTMLCell($w = 0, $h = 0, '', '', $final, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
}
//$left_column = $pdf->write2DBarcode('7024736019|3|2104002021751|2015-10-02|30.50|30.50|15451254|0|0|0|0', 'QRCODE,L', '175', '', 30, 30, '', 'N');
//$pdf->writeHTMLCell(80, '', '', '', $left_column, 0, 0, 0, true, 'J', true);
//qr roy
$pdf->write2DBarcode('7024736019|3|2104002021751|2015-10-02|30.50|30.50|15451254|0|0|0|0', 'QRCODE,L', '175', $pdf->GetY() - 40, 20, 20, '', 'N');
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_003.pdf', 'I');
//============================================================+
// END OF FILE
//============================================================+
Example #5
0
     $ypos = $imageheight + 1.5;
     $pdf->SetY($ypos);
     $m = 1;
     unset($notes);
     if ($resources[$n]['annotation_count'] != 0) {
         $notes = sql_query("select * from annotate_notes where ref='{$ref}'");
         foreach ($notes as $note) {
             $ratio = $imagewidth / $note['preview_width'];
             $note_y = $note['top_pos'] * $ratio;
             $note_x = $note['left_pos'] * $ratio;
             $note_width = $note['width'] * $ratio;
             $note_height = $note['height'] * $ratio;
             $pdf->SetLineStyle($style1);
             $pdf->Rect(($width - 1) / 2 - ($imagewidth - 1) / 2 + $note_x, $note_y + 1, $note_width, $note_height);
             $pdf->Rect(($width - 1) / 2 - ($imagewidth - 1) / 2 + $note_x, $note_y + 1, 0.1, 0.1, 'DF', $style1, array(255, 255, 0));
             $ypos = $pdf->GetY();
             $pdf->Text(($width - 1) / 2 - ($imagewidth - 1) / 2 + $note_x - 0.01, $note_y + 0.99, $m, false, false, true, 0, 0, 'L');
             //$pdf->SetLineStyle($style2);
             //$pdf->Rect(((($width-1)/2)-($imagewidth-1)/2)+$note_x,$note_y+1,$note_width,$note_height);
             $pdf->SetY($ypos);
             $note_user = get_user($note['user']);
             $pdf->SetLineStyle($style);
             $noteparts = explode(":", $note['note'], 2);
             $pdf->MultiRow($m, trim($noteparts[1]) . " - " . $note_user['fullname']);
             $ypos = $ypos + 0.5;
             $m++;
         }
     }
 }
 // reset pointer to the last page
 $pdf->lastPage();
Example #6
0
$pdf->SetCellPadding(0);
$pdf->AddPage();
$pdf->SetFont($contact_sheet_font, '', '', '', $subsetting);
$pdf->ln();
$pdf->ln();
$pdf->SetFontSize($refnumberfontsize);
#Begin loop through resources, collecting Keywords too.
$i = 0;
$j = 0;
for ($n = 0; $n < count($result); $n++) {
    $ref = $result[$n]["ref"];
    $preview_extension = $result[$n]["preview_extension"];
    $resourcetitle = "";
    $i++;
    $currentx = $pdf->GetX();
    $currenty = $pdf->GetY();
    if ($ref !== false) {
        # Find image
        # Load access level
        $access = get_resource_access($result[$n]);
        // feed get_resource_access the resource array rather than the ref, since access is included.
        $use_watermark = check_use_watermark();
        $imgpath = get_resource_path($ref, true, $imgsize, false, $preview_extension, -1, 1, $use_watermark);
        $preview_extension = "jpeg";
        if (!file_exists($imgpath)) {
            $imgpath = "../../gfx/" . get_nopreview_icon($result[$n]['resource_type'], $result[$n]['file_extension'], false, true);
            $preview_extension = explode(".", $imgpath);
            if (count($preview_extension) > 1) {
                $preview_extension = trim(strtolower($preview_extension[count($preview_extension) - 1]));
            }
        }
        $this->SetY(-15);
        // Arial italic 8
        $this->SetFont('Arial', 'I', 8);
        // Número de página
        $this->Cell(0, 10, 'Pagina ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
$pdf = new MYPDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont("Arial", "", 6);
$pdf->Cell(0, 3, utf8_decode("Fecha de Impresión:") . date('Y-m-d  H:m:i'), 0, 1, "R");
$pdf->SetFont("Arial", "", 10);
//parte datos de la persona
$pdf->x1 = 7;
$pdf->y1 = $pdf->GetY();
$pdf->SetWidths(array(40, 60, 40, 60));
$pdf->Row_SinLine(array("Clave de Evaluado:", $row_srcEvaluado["CodigoEvaluado"], utf8_decode("Fecha de Evaluación:"), $row_srcEvalExamenes["FechaEvaluacion"]), "");
$pdf->Ln(3);
$pdf->Row_SinLine(array("Nombre de Evaluado:", utf8_decode($row_srcEvaluado["Nombre"] . " " . $row_srcEvaluado["Paterno"] . " " . $row_srcEvaluado["Materno"]), "", ""), "");
$pdf->Ln(3);
$pdf->Row_SinLine(array("Puesto:", utf8_decode($row_srcEvaluado["Puesto"]), "No. de Oficio:", $row_srcEvaluado["cOficio"]), "");
$pdf->Ln(3);
$pdf->SetWidths(array(40, 200));
$pdf->Row_SinLine(array("Dependencia:", utf8_decode($row_srcEvaluado["Dependencia"])), "");
$pdf->Ln(3);
$pdf->Row_SinLine(array("Subdependencia:", "-"), "");
$pdf->x2 = 205;
$pdf->y2 = $pdf->GetY();
//dibujar rectangulo, ancho y alto, diferencia entre x e y actual con x e y iniciales
$pdf->Rect($pdf->x1, $pdf->y1, $pdf->x2 - $pdf->x1, $pdf->y2 - $pdf->y1);
 $notepages = 1;
 // Normally notes will all fit on one page, but may not
 foreach ($notes as $note) {
     // If the notes took us to a new page, return to the image page before marking annotation
     if ($notepages > 1) {
         $pdf->setPage($currentpdfpage);
     }
     $ratio = $imagewidth / $note['preview_width'];
     $note_y = $note['top_pos'] * $ratio;
     $note_x = $note['left_pos'] * $ratio;
     $note_width = $note['width'] * $ratio;
     $note_height = $note['height'] * $ratio;
     $pdf->SetLineStyle($style1);
     $pdf->Rect(($width - 1) / 2 - ($imagewidth - 1) / 2 + $note_x, $note_y + 1, $note_width, $note_height);
     $pdf->Rect(($width - 1) / 2 - ($imagewidth - 1) / 2 + $note_x, $note_y + 1, 0.1, 0.1, 'DF', $style1, array(255, 255, 0));
     $ypos = $pdf->GetY();
     $pdf->Text(($width - 1) / 2 - ($imagewidth - 1) / 2 + $note_x - 0.01, $note_y + 0.99, $m, false, false, true, 0, 0, 'L');
     //$pdf->SetLineStyle($style2);
     //$pdf->Rect(((($width-1)/2)-($imagewidth-1)/2)+$note_x,$note_y+1,$note_width,$note_height);
     $pdf->SetY($ypos);
     $note_user = get_user($note['user']);
     $pdf->SetLineStyle($style);
     $noteparts = explode(":", $note['note'], 2);
     // If the notes went over the page, we  went back to image for annotation, so we need to return to the page with the last row of the table before adding next row
     if ($notepages > 1) {
         $pdf->setPage($currentpdfpage + ($notepages - 1));
     }
     $pdf->MultiRow($m, trim($noteparts[1]) . " - " . $note_user['fullname']);
     // Check if this new table row has moved us to a new page, in which case we need to record this and go back to image page before the next annotation
     if (isset($notepos)) {
         $lastnotepos = $notepos;