define('PARAGRAPH_STRING', '~~~'); //Tag Based Multicell Class require_once "class.multicelltag.php"; //Class Extention for header and footer require_once "header_footer.inc"; $pdf = new pdf_usage(); $pdf->Open(); $pdf->SetMargins(20, 20, 20); $pdf->AddPage(); $pdf->AliasNbPages(); $pdf->SetFont('arial', '', 11); $pdf->SetTextColor(200, 10, 10); $pdf->SetFillColor(254, 255, 245); $pdf->SetStyle("p", "times", "", 11, "130,0,30"); $pdf->SetStyle("pb", "times", "B", 11, "130,0,30"); $pdf->SetStyle("t1", "arial", "", 11, "80,80,260"); $pdf->SetStyle("t3", "times", "B", 14, "203,0,48"); $pdf->SetStyle("t4", "arial", "BI", 11, "0,151,200"); $pdf->SetStyle("hh", "times", "B", 11, "255,189,12"); $pdf->SetStyle("ss", "arial", "", 7, "203,0,48"); $pdf->SetStyle("font", "helvetica", "", 10, "0,0,255"); $pdf->SetStyle("style", "helvetica", "BI", 10, "0,0,220"); $pdf->SetStyle("size", "times", "BI", 13, "0,0,120"); $pdf->SetStyle("color", "times", "BI", 13, "0,255,255"); $txt1 = "Created by <t1 href='mailto:andy@interpid.eu'>Bintintan Andrei, Interpid Team</t1>"; $txt2 = "<p><t3>Description</t3>\r\n\r\n\tThis method allows printing of <t4><TAG></t4> formatted text with line breaks. They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the <pb>\\n</pb> character).</p>\r\n\r\n<t3>Features:</t3>\r\n<p>\t- Text can be <hh>aligned</hh>, <hh>cente~~~red</hh> or <hh>justified</hh>\r\n\t- Different <font>Font</font>, <size>Sizes</size>, <style>Styles</style>, <color>Colors</color> can be used \r\n\t- The cell block can be framed and the background painted\r\n\t- <style href='www.fpdf.org'>Links</style> can be used in any tag\r\n\t- <t4>TAB</t4> spaces (<pb>\\t</pb>) can be used\r\n\t- Variable Y relative positions can be used for <ss ypos='-0.8'>Subscript</ss> or <ss ypos='1.1'>Superscript</ss>\r\n\t- Cell padding (left, right, top, bottom)\r\n\t- Controlled Tag Sizes can be used</p>\r\n\r\n\t<size size='50' >Paragraph Example:~~~</size><font> - Paragraph 1</font>\r\n\t<p size='60' > ~~~</p><font> - Paragraph 2</font>\r\n\t<p size='60' > ~~~</p> - Paragraph 2\r\n\t<p size='70' >Sample text~~~</p><p> - Paragraph 3</p>\r\n\t<p size='50' >Sample text~~~</p> - Paragraph 1\r\n\t<p size='60' > ~~~</p><t4> - Paragraph 2</t4>\r\n\r\n<t3>Observations:</t3>\r\n<p>\r\n\t- If no <t4><TAG></t4> is specified then the FPDF current settings(font, style, size, color) are used\r\n\t- The <t4>ttags</t4> tag name is reserved for the TAB SPACES\r\n</p>"; $pdf->MultiCellTag(150, 5, $txt1, 1, "L", 1, 5, 5, 5, 5); $pdf->Ln(10); $pdf->MultiCellTag(0, 5, $txt2, 1, "J", 1, 3, 3, 3, 3); $pdf->Ln(10); $pdf->Output();
ereg("([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})", $fecha, $mifecha); $lafecha = $mifecha[3] . " / " . $mifecha[2] . " / " . $mifecha[1]; return $lafecha; } //Linea 1 $pdf->SetFont('arial', 'B', 11); $pdf->Cell(17, 6, 'Fecha: ', 0, 0, 'L'); $pdf->SetFont('arial', '', 11); $pdf->Cell(17, 6, cambiaf($row_sqlPagos['fecha']), 0, 0, 'L'); $pdf->Cell(80, 6, '', 0, 0, 'L'); $pdf->Cell(30, 6, 'CANTIDAD Bs.', 0, 0, 'L'); $pdf->SetFont('arial', 'B', 11); $pdf->Cell(17, 6, ' ' . number_format($row_sqlPagos['cantidad'] . ' ', 2, ",", "."), 0, 1, 'L'); $pdf->SetFont('arial', '', 11); $text_contrato0 = 'Hemos recibido de: <t1>' . $cli . ' V.-' . $row_Cliente['cedula'] . ' </t1>'; $pdf->MultiCellTag(0, 6, $text_contrato0, 0, "J", 1, 0, 0, 0, 0); $num = $row_sqlPagos['cantidad']; $V = new EnLetras(); $V->ValorEnLetras($num, "Bolivares"); $pdf->SetFont('arial', '', 11); $text_contrato1 = 'La Cantidad de : <t1>' . $V->ValorEnLetras($num, "Bolivares") . ' </t1>'; $pdf->MultiCellTag(0, 6, $text_contrato1, 0, "J", 1, 0, 0, 0, 0); //DESCRIPCIÓN DEL PAGO //table: $pdf->Ln(2); $pdf->SetFont('arial', 'B', 11); $pdf->Cell(17, 6, 'Detalle del Pago: ', 0, 1, 'L'); //Tabla Títulos $pdf->SetFont('arial', 'B', 8); $pdf->Cell(2, 4, '', 0, 0, 'C'); $pdf->Cell(30, 4, 'REFERENCIA', 1, 0, 'C');
$bg_color3 = array(255, 252, 249); $bg_color4 = array(86, 155, 225); $bg_color5 = array(207, 247, 239); $bg_color6 = array(246, 211, 207); $bg_color7 = array(216, 243, 228); $pdf = new pdf_usage(); $pdf->Open(); $pdf->SetAutoPageBreak(true, 20); $pdf->SetMargins(20, 20, 20); $pdf->AddPage(); $pdf->AliasNbPages(); $pdf->SetStyle("s1", "arial", "", 8, "118,0,3"); $pdf->SetStyle("s2", "arial", "", 6, "0,49,159"); //default text color $pdf->SetTextColor(118, 0, 3); $pdf->MultiCellTag(100, 4, "<s1>Example 1 - Very Simple Table</s1>", 0); $pdf->Ln(1); require 'example1.inc'; $pdf->Ln(10); $sTxt = "<s1>Example 2 - More detailed Table</s1>\n<s2>\t- Table Align = Center\n\t- The header has multiple lines\n\t- Colspanning Example\n\t- Rowspanning Example\n\t- Text Alignments\n\t- Properties overwriting</s2>"; $pdf->SetX(60); $pdf->MultiCellTag(100, 2.5, $sTxt, 0); $pdf->Ln(1); require 'example2.inc'; $pdf->Ln(10); $sTxt = "<s1>Example 3 - Table split end of the page</s1>\n<s2>\t- This is the table from Example 2 at the end of the page\n\t- Splitting mode = ON, you can see that the cells are splitted</s2>"; $pdf->SetXY(60, 215); $pdf->MultiCellTag(100, 2.5, $sTxt, 0); $pdf->Ln(1); $bTableSplitMode = true; require 'example2.inc';
$row_Cliente = mysql_fetch_assoc($query_Cliente); $totalRows_Cliente = mysql_num_rows($query_Cliente); //define the Paragraph String ~~ Required by Multicell Class define('PARAGRAPH_STRING', '~~~'); //Tag Based Multicell Class require_once "class.multicelltag.php"; //Class Extention for header and footer require_once "header_footer.inc"; $pdf = new pdf_usage(); $pdf->Open(); $pdf->AddPage(); $pdf->AliasNbPages(); $pdf->SetFont('arial', '', 9); $pdf->SetTextColor(0, 0, 0); $pdf->SetFillColor(255, 255, 255); $pdf->SetStyle("t1", "arial", "B", 9, "0,0,0"); $pdf->SetStyle("tx", "arial", "", 9, "0,0,0"); //DETALLE DEL CONTRATO $cli = $row_Cliente['primerApellido'] . ' ' . $row_Cliente['segundoApellido'] . ', ' . $row_Cliente['nombres']; $cli = strtoupper($cli); $nac = strtoupper($row_Cliente['nacionalidad']); $dir = $row_Cliente['direccionHab']; //Linea 1 $pdf->SetFont('arial', '', 9); $text_contrato = 'Entre, <t1>TECNOINVERSIONES RB</t1>, domiciliada en Cagua quien para los efectos de este contrato se entenderá como <t1>LA EMPRESA</t1> por una parte y por la otra el (la) ciudadano (a) <t1>' . $cli . '</t1>, quien es de nacionalidad mayor de edad, titular de la cédula de identidad número <t1>V.-' . $row_Cliente['cedula'] . '</t1> domiciliado en <t1>' . $dir . '</t1>, Ciudad <t1>' . $row_Cliente['ciudadNac'] . '</t1> del Estado <t1>' . $row_Cliente['estadoNac'] . '</t1>, teléfono de Habitación ' . $row_Cliente['telefonoc'] . ', teléfono celular ' . $row_Cliente['celular'] . ', lugar de trabajo ' . $row_Cliente['nombreEmp'] . ', Dirección ' . $row_Cliente['dirTrabajo'] . ', Teléfono del Trabajo ' . $row_Cliente['telefonoEmp'] . ', Cargo que desempeña ' . $row_Cliente['cargo'] . ', e-mail ' . $row_Cliente['email'] . ', quien para los efectos de este contrato se denominará <t1>EL COMPRADOR</t1>, se ha convenido en celebrar la presente negociación como <t1>CONTRATO DE VENTA A PLAZO BAJO CONDICIÓN</t1>, el cual se regirá por las claúsulas que ha continuación se señalan y se plasman.'; $pdf->MultiCellTag(0, 5, $text_contrato, 0, "J", 1, 3, 3, 3, 3); $text_contrato1 = 'PRIMERA: LA EMPRESA, se compromete a vender a crédito y EL COMPRADOR(A) acepta comprar la(s) mercancía(s) que se detallan más adelante, una vez que EL COMPRADOR(A) califique para optar al crédito comercial, producto de esta negociación.'; $pdf->MultiCellTag(0, 5, $text_contrato1, 0, "J", 1, 3, 3, 3, 3); $text_contrato2 = 'SEGUNDA: Descripción de la(s) mercancía(s) y precio(s).'; $pdf->MultiCellTag(0, 5, $text_contrato2, 0, "J", 1, 3, 3, 3, 3); $pdf->Output();
$pdf->Cell(80, 3, '0416-0458957 / 0426-5180385 / 0424-3261656', 0, 1, 'C'); $pdf->Ln(9); $pdf->SetFont('arial', '', 11); $pdf->SetTextColor(0, 0, 0); $pdf->SetFillColor(255, 255, 255); $pdf->SetStyle("t1", "arial", "B", 11, "0,0,0"); $pdf->SetStyle("tx", "arial", "", 11, "0,0,0"); //DETALLE DEL CONTRATO $cli = $row_Cliente['primerApellido'] . ' ' . $row_Cliente['segundoApellido'] . ', ' . $row_Cliente['nombres']; $cli = strtoupper($cli); $nac = strtoupper($row_Cliente['nacionalidad']); $dir = $row_Cliente['direccionHab']; //Linea 1 $pdf->SetFont('arial', '', 11); $text_contrato = 'Entre, <t1>TECNOINVERSIONES RB</t1>, domiciliada en Cagua quien para los efectos de este contrato se entenderá como <t1>LA EMPRESA</t1> por una parte y por la otra el (la) ciudadano (a) <t1>' . $cli . '</t1>, quien es de nacionalidad mayor de edad, titular de la cédula de identidad número <t1>V.-' . $row_Cliente['cedula'] . '</t1> domiciliado en <t1>' . $dir . '</t1>, Ciudad <t1>' . $row_Cliente['ciudadNac'] . '</t1> del Estado <t1>' . $row_Cliente['estadoNac'] . '</t1>, teléfono de Habitación ' . $row_Cliente['telefonoc'] . ', teléfono celular ' . $row_Cliente['celular'] . ', lugar de trabajo ' . $row_Cliente['nombreEmp'] . ', Dirección ' . $row_Cliente['dirTrabajo'] . ', Teléfono del Trabajo ' . $row_Cliente['telefonoEmp'] . ', Cargo que desempeña ' . $row_Cliente['cargo'] . ', e-mail ' . $row_Cliente['email'] . ', quien para los efectos de este contrato se denominará <t1>EL COMPRADOR</t1>, se ha convenido en celebrar la presente negociación como <t1>CONTRATO DE VENTA A PLAZO BAJO CONDICIÓN</t1>, el cual se regirá por las claúsulas que ha continuación se señalan y se plasman.'; $pdf->MultiCellTag(0, 6, $text_contrato, 0, "J", 1, 0, 0, 0, 0); $text_contrato1 = '<t1>PRIMERA: LA EMPRESA</t1>, se compromete a vender a crédito y <t1>EL COMPRADOR(A)</t1> acepta comprar la(s) mercancía(s) que se detallan más adelante, una vez que <t1>EL COMPRADOR(A)</t1> califique para optar al crédito comercial, producto de esta negociación.'; $pdf->MultiCellTag(0, 6, $text_contrato1, 0, "J", 1, 0, 0, 0, 0); $text_contrato2 = '<t1>SEGUNDA:</t1> Descripción de la(s) mercancía(s) y precio(s).'; $pdf->MultiCellTag(0, 6, $text_contrato2, 0, "J", 1, 0, 0, 0, 0); //DESCRIPCIÓN DE LOS PRODUCTOS //table: $pdf->Ln(2); //Tabla Títulos $pdf->SetFont('arial', 'B', 8); $pdf->Cell(2, 4, '', 0, 0, 'C'); $pdf->Cell(30, 4, 'REFERENCIA', 1, 0, 'C'); $pdf->Cell(69, 4, 'DESCRIPCION', 1, 0, 'C'); $pdf->Cell(12, 4, 'CUOTAS', 1, 0, 'C'); $pdf->Cell(15, 4, 'MONTO', 1, 0, 'C'); $pdf->Cell(17, 4, 'F. INICIO', 1, 0, 'C');