$pdf->Write(0, 'Catálogo', '', 0, 'L', true, 0, false, false, 0); $pdf->SetFont('helvetica', '', 8); //--------------------------------- $tbl = <<<EOD <table border="1" cellpadding="0" cellspacing="1" align="center" fontsize="14"> <tr> <td></td><td><br /><br /><br /><br /></td> </tr> <tr> <th colspan="2"><h1>Estructura Programática</h1></th> </tr> </table> EOD; $pdf->writeHTML($tbl, true, false, false, false, ''); $pdf->Ln(); $pdf->SetLineStyle(array('width' => 0.0, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => array(255, 0, 0))); $pdf->SetFillColor(255, 255, 128); $pdf->SetTextColor(0, 0, 128); $pdf->Ln(); $tbl = <<<EOD <table border="1" cellpadding="1" cellspacing="1" align="center" fontsize="12"> <tr> <th colspan="1">ID</th> <th colspan="1">CLAVE</th> <th colspan="1">DESCRIPCIÓN</th> <th colspan="1">TIPO</th> </tr> </table> EOD; $pdf->writeHTML($tbl, true, false, false, false, ''); $pdf->Ln();
<td align="left" style="font-size:10px">: ' . $nfac . '</td> </tr> <tr> <td style="font-size:8px">AUTORIZACIÓN Nº</td> <td align="left" style="font-size:10px">: ' . $nauto . '</td> </tr> <tr><td></td></tr> <tr> <td align = "center" colspan="2">' . $sfc . '</td> </tr> </table> '; //imprime el contenido de la variable html $pdf->writeHTMLCell($w = 0, $h = 0, $x = '140', $y = '17', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true); //dibuja un rectangulo $pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))); $pdf->RoundedRect(138, 15, 61, 18, 2, '1111', null); $imgdata = base64_decode($invoice->logo); $pdf->Image('@' . $imgdata, '19', '10', 80, 24, '', '', 'T', false, 300, '', false, false, 0, false, false, false); ///title $anchoDivFac = 480; if ($invoice->type_third == 0) { $factura = "FACTURA"; $tercero = ""; } else { $factura = "FACTURA POR TERCEROS"; $tercero = $matriz->name; $anchoDivFac = 520; } $titleFactura = '<table> <tr>
$style = array('width' => 0.01, 'cap' => 'butt', 'join' => 'round', 'dash' => '0', 'color' => array(100, 100, 100)); $style1 = array('width' => 0.04, 'cap' => 'butt', 'join' => 'round', 'dash' => '0', 'color' => array(255, 255, 0)); $style2 = array('width' => 0.02, 'cap' => 'butt', 'join' => 'round', 'dash' => '3', 'color' => array(255, 0, 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++; } }