TCPDF
Regole del forum
Nel forum è vietato fare pubblicità senza avere l'autorizzazione dello staf di Netspecial.
Nel forum è vietato fare pubblicità senza avere l'autorizzazione dello staf di Netspecial.
TCPDF
Buonasera, sono riuscito a creare un report con tcpdf con l'intendo di avere una grafica migliore fin qui tutto bene l'unico problema è quello che quando esplodo il podf mi visualizza solo il primo record preciso che il pdf lo apro dalla maschera ricerca dove posso filtrare più record.
dove sbaglio???
dove sbaglio???
Re: TCPDF
per eslodere intedo visualizzare il pdf, di seguito posto il codice
//============================================================+
// File name : example_004.php
// Begin : 2008-03-04
// Last Update : 2013-05-14
//
// Description : Example 004 for TCPDF class
// Cell stretching
//
// Author: Nicola Asuni
//
// (c) Copyright:
// Nicola Asuni
// Tecnick.com LTD
// www.tecnick.com
// info@tecnick.com
//============================================================+
/**
* Creates an example PDF TEST document using TCPDF
* @package com.tecnick.tcpdf
* @abstract TCPDF - Example: Cell stretching
* @author Nicola Asuni
* @since 2008-03-04
*/
// Include the main TCPDF library (search for installation path).
//require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor(' Nicola Asuni');
$pdf->SetTitle('Report');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 004', PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
// set font
$pdf->SetFont('times', '', 11);
// set font
$pdf->SetFont('times', 'B', 10);
// add a page
//$pdf->AddPage();
// set cell padding
$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
$pdf->setCellMargins(1, 1, 1, 1);
// set color for background
$pdf->SetFillColor(255, 255, 127);
// add a page
//$pdf->AddPage();
//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
// test Cell stretching
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
$pdf->SetDrawColor(40);
$pdf->SetFillColor(240);
$pdf->SetTextColor(127);
//$pdf->Rect(30, 160, 30, 30, 'DF', $border_style);
$pdf->Rect(30, 160, '', '', 'DF' , $border_style);
//$pdf->Text(30, 40, 'GrayTH');
//$pdf->SetFillColor(0,255,0);
//$pdf->SetTextColor(1,1,1);
$pdf->SetFont('times', 'B', 16);
$pdf->MultiCell(83, 4, {COMMITTENTE}, 8, '', C, 1, '', 7);
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
$pdf->SetDrawColor(40);
$pdf->SetFillColor(240);
$pdf->SetTextColor(127);
//$pdf->Rect(30, 160, 30, 30, 'DF', $border_style);
$pdf->Rect(30, 160, '', '', 'DF' , $border_style);
//$pdf->Text(30, 40, 'Gray');
//$pdf->SetFillColor(0,0,255);
$pdf->SetTextColor(1,1,1);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(70, 4,{FILIALE}, 1, '', L, 1, 99, 9,true);
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(30, 4,{RIFERIMENTOPRATICA}, 1, '', C, 1, 170, 9, true);
$pdf->Ln(60);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(45, 4, 'Garante - Coob.', 1, 1, 'C', 0, '', 28);
$pdf->Ln(10);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', '', 8);
foreach ({GA} as $GA_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$RAGGA= {GA.GARANTE}[$GA_ind];
$INDGA= {GA.INDIRIZZOGARA}[$GA_ind];
$CAPGA= {GA.CAPGARA}[$GA_ind];
$LOCGA= {DL.LOCALITAGARA}[$GA_ind];
$PROGA= {GA.PROVINCIAGARA}[$GA_ind];
$TELGA= {GA.TELEFONOGARA}[$GA_ind];
$EMAGA= {GA.EMAILGARA}[$GA_ind];
$LNGA= {GA.LUOGONASCITAGARA}[$GA_ind];
$DNGA= {GA.DATANASCITAGARA}[$GA_ind];
$CFGA= {GA.CODICEFISCALEGARA}[$GA_ind];
$pdf->MultiCell(100, 0,$RAGGA, 1, 1, '', '', '', 35, true);
$pdf->MultiCell(48, 0,$INDGA, 1, 1, '', '', '', 42);
$pdf->MultiCell(12, 0,$CAPDA, 1, 1, '', '', 65, 42);
$pdf->MultiCell(32, 0,$LOCGA, 1, 1, '', '', 78, 42);
$pdf->MultiCell(6, 0,$PROGA, 1, 1, '', 0, 104, 49, true);
$pdf->MultiCell(27, 0,$TELGA, 1, 1, '', 0, '', 49);
//$pdf->MultiCell(50, 0,$ATEDA, 1, 1, '', 0, 32, 49, true);
$pdf->MultiCell(60, 0,$EMAGA, 1, 1, '', 0, 43, 49, true );
$pdf->MultiCell(44, 0,$LNGA, 1, 1, '', 0, '', 56);
$pdf->MultiCell(20, 0,$DNGA, 1, 1, '', 0, 60, 56);
$pdf->MultiCell(30, 0,$CFGA, 1, 1, '', 0, 80, 56, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 12);
$pdf->MultiCell(80, 4, {RAGIONESOCIALE}, '', 1, '', '', 125, 35, true);
$pdf->Ln(6);
//$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
//$pdf->SetTextColor(1,1,0);
//$pdf->SetFont('times', '', 8);
//$pdf->MultiCell(20, 4, 'Data Scadenza', 1, 1, 'C', 0, '', 40);
//$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
//$pdf->SetTextColor(1,1,0);
//$pdf->SetFont('times', 'B', 10);
//$pdf->MultiCell(40, 0, {DATASCADENZA}, '', 1, '', '', 37, 40);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 10);
$pdf->MultiCell(80, 0, {INDIRIZZO}, '', 1, '', '', 125, '', true);
$pdf->Ln(6);
$pdf->MultiCell(30, 0, {CAP}, '', 1, '', '', 125,'');
$pdf->MultiCell(110, 0, {LOCALITA}, '', 1, '', '', 135, '');
$pdf->MultiCell(20, 0, {PROVINCIA}, '', 1, '', '', 190, '', true);
$pdf->Ln(6);
$pdf->MultiCell(24, 0, 'Contratto Nr.', 1, 1, 'C', 0, '', 20);
$pdf->MultiCell(33, 0, {CONTRATTO}, 1, 1, '', '', 39, 20);
$pdf->MultiCell(33, 0, 'Lotto Interno Nr.', 1, 1, 'C', 0, 73, 20);
$pdf->MultiCell(18, 0, {IDIMPORTAZIONE}, 1, 1, '', '', 106, 20);
$pdf->MultiCell(40, 0, 'Lotto Esterno Nr.', 1, 1, 'C', 0, 125, 20);
$pdf->MultiCell(37, 0, {LOTTO}, 1, 1, '', '', 165, 20, true);
$pdf->Ln(6);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 9);
$pdf->MultiCell(20, 0, 'Data Affido', 1, 1, 'C', 0, 86, 28);
$pdf->MultiCell(30, 0, {DataAffidoG}, 1, 1, '', '', 106, 28);
$pdf->MultiCell(27, 0, 'Data Scadenza', 1, 1, 'C', 0, 142, 28);
$pdf->MultiCell(33, 0, {DataScadenzaG}, 1, 1, '', '', 169, 28, true);
//$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', '');
$pdf->MultiCell(37, 0, 'Data Decorrenza Contr.', 1, 1, 'C', 0, '', 109);
$pdf->MultiCell(33, 0, {DATASTIPULA}, 1, 1, '', '', 53, 109);
$pdf->MultiCell(35, 0, 'Data Termine Contr.', 1, 1, 'C', 0, 86, 109);
$pdf->MultiCell(33, 0, {DATATERMINE}, 1, 1, '', '', 121, 109);
$pdf->MultiCell(20, 0, 'Residuo', 1, 1, 'C', 0, 152, 109);
$pdf->MultiCell(28, 0, {IMPORTORISC}, 1, 1, '', '', 173, 109, true);
$pdf->Ln(6);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(20, 0, 'Dalla Rata', 1, 1, 'C', 0, '', 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(25, 0, {DALLARATA}, 1, 1, '', '', 36, 118);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(23, 0, 'Alla Rata', 1, 1, 'C', 0, 58, 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(25, 0, {ALLARATA}, 1, 1, '', '', 83, 118);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(20, 0, 'Nr. Rate', 1, 1, 'C', 0, 109, 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(10, 0, {NUMERORATE}, 1, 1, '', '', 130, 118);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(28, 0, 'Importo Rata', 1, 1, 'C', 0, 142, 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(30, 0, {IMPORTORATA}, 1, 1, '', '', 171, 118, true);
$pdf->Ln(6);
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
$pdf->SetDrawColor(40);
$pdf->SetFillColor(240);
$pdf->SetTextColor(127);
//$pdf->Rect(30, 160, 30, 30, 'DF', $border_style);
$pdf->Rect(30, 160, '', '', 'DF' , $border_style);
//$pdf->Text(30, 40, 'Gray');
//$pdf->SetFillColor(0,0,255);
$pdf->SetTextColor(1,1,1);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(29, 4, 'IMPORTO1', 1, '', L, 1, 21, 131);
$pdf->MultiCell(30, 4, 'IMPORTO2', 1, 1, 'C', 0, 51, 131);
$pdf->MultiCell(30, 4, 'Altro importo', 1, 1, 'C', 0, 82, 131);
$pdf->MultiCell(30, 4, 'IMPORTO3', 1, 1, 'C', 0, 113, 131);
$pdf->SetFont('times', B, 11);
$pdf->MultiCell(50, 4, 'Totale', 1, 1, 'C', 0, 145, 131, true);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(29, 4, {IMPORTO1}, 1, 1, '', '', 21, 139);
$pdf->MultiCell(30, 4, {IMPORTO2}, 1, 1, '', '', 51, 139);
$pdf->MultiCell(30, 4, {ALTRIMPORTI}, 1, 1, '', '', 82, 139);
$pdf->MultiCell(30, 4, {IMPORTO3}, 1, 1, '', '', 113, 139);
$pdf->SetFont('times', B, 11);
$pdf->MultiCell(50, 4, {TOTALE}, 1, 1, '', '', 145, 139, true);
$pdf->Ln(6);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', '', 10);
//$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', '');
$pdf->MultiCell(62, 0, 'Luogo Nascita', 1, 1, 'C', 0, '', 68);
$pdf->MultiCell(40, 0, 'Data Nascita', 1, 1, 'C', 0, 78, 68);
$pdf->MultiCell(38, 0, 'Cod. Fiscale - P. IVA.', 1, 1, 'C', 0, 119, 68);
$pdf->MultiCell(40, 0, 'Esposizione', 1, 1, 'C', 0, 160, 68, true);
$pdf->MultiCell(62, 0, {LUOGONASCITA}, 1, 1, '', '', '', 76);
$pdf->MultiCell(40, 0, {DATANASCITA}, 1, 1, '', '', 78, 76);
$pdf->MultiCell(38, 0, {CODICEFISCALE}, 1, 1, '', '', 119, 76);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(40, 0, {Esposizione}, 1, 1, '', '', 160, 76, true);
$pdf->Ln(6);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(30, 0, 'Telefono', 1, 1, 'C', 0, '', 85);
$pdf->MultiCell(30, 0, 'Altro Telefono', 1, 1, 'C', 0, 46, 85);
$pdf->MultiCell(30, 0, 'Mobile', 1, 1, 'C', 0, 77, 85);
$pdf->MultiCell(30, 0, 'Fax', 1, 1, 'C', 0, 108, 85);
$pdf->MultiCell(60, 0, 'E-Mail', 1, 1, 'C', 0, 140, 85, true);
$pdf->MultiCell(30, 0, {TELEFONO}, 1, 1, '', '', '', 93);
$pdf->MultiCell(30, 0, {ALTROTELEFONO}, 1, 1, '', '', 46, 93);
$pdf->MultiCell(30, 0, {CELLULARE}, 1, 1, '', '', 77, 93);
$pdf->MultiCell(30, 0, {FAXD}, 1, 1, '', '', 108, 93);
$pdf->MultiCell(60, 0, {EMAIL}, 1, 1, '', '', 140, 93, true);
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Datore Lavoro', 1, 1, 'C', 0, '', 152);
$pdf->Ln(10);
foreach ({DL} as $DL_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$RAGDA= {DL.RAGIONESOCIALE}[$DL_ind];
$INDDA= {DL.INDIRIZZO}[$DL_ind];
$CAPDA= {DL.CAP}[$DL_ind];
$LOCDA= {DL.LOCALITA}[$DL_ind];
$PRODA= {DL.PROVINCIA}[$DL_ind];
$TELDA= {DL.TELEFONO}[$DL_ind];
$ATEDA= {DL.ALTROTELEFONO}[$DL_ind];
$EMADA= {DL.EMAIL}[$DL_ind];
$pdf->MultiCell(40, 0,$RAGDA, 1, 1, '', '', '', 160);
$pdf->MultiCell(36, 0,$INDDA, 1, 1, '', '', 55, 160);
$pdf->MultiCell(11, 0,$CAPDA, 1, 1, '', '', 92, 160);
$pdf->MultiCell(32, 0,$LOCDA, 1, 1, '', '', 104, 160);
$pdf->MultiCell(6, 0,$PRODA, 1, 1, '', 0, 136, 160);
$pdf->MultiCell(20, 0,$TELDA, 1, 1, '', 0, 142, 160);
//$pdf->MultiCell(50, 0,$ATEDA, 1, 1, '', 0, '', 160);
$pdf->MultiCell(50, 0,$EMADA, 1, 1, '', 0, 162, 160, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Bene', 1, 1, 'C', 0, '', 173);
$pdf->Ln(10);
foreach ({BN} as $BN_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$DESC= {BN.DESCRIZIONE}[$DL_ind];
$TIP= {BN.TIPO}[$DL_ind];
$TARG= {BN.TARGA}[$DL_ind];
$MAR= {BN.MARCA}[$DL_ind];
$ADA= {BN.ALTRODATO}[$DL_ind];
$pdf->MultiCell(51, 0,$DESC, 1, 1, '', '', '', 180);
$pdf->MultiCell(36, 0,$TIP, 1, 1, '', '', 66, 180);
$pdf->MultiCell(15, 0,$TARG, 1, 1, '', '', 103, 180);
$pdf->MultiCell(32, 0,$MAR, 1, 1, '', '', 119, 180);
$pdf->MultiCell(56, 0,$ADA, 1, 1, '', 0, 156, 180, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Banca', 1, 1, 'C', 0, '', 189);
$pdf->Ln(10);
foreach ({Bc} as $Bc_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$ABI= {Bc.ABIBANCADEB}[$Bc_ind];
$CAB= {Bc.CABBANCA}[$Bc_ind];
$IST= {Bc.ISTITUTOBANCA}[$Bc_ind];
$FIL= {Bc.FILIALEBANCADEB}[$Bc_ind];
$IND= {Bc.INDIRIZZOBANCA}[$Bc_ind];
$LOC= {Bc.LOCALITABANCA}[$Bc_indnd];
$PRO= {Bc.PROVBANCA}[$Bc_ind];
$CC= {Bc.CONTOCORRENTEBANCA}[$Bc_ind];
$IBN= {Bc.IBANBANCA}[$Bc_ind];
// set general spacing value
// $pdf->setFontSpacing($spacing);
$pdf->MultiCell(10, 0,$ABI, 1, 1, '', '', '', 197);
$pdf->MultiCell(10, 0,$CAB, 1, 1, '', '', 25, 197);
$pdf->SetFont('times', '', 6);
$pdf->MultiCell(65, 0,$IST, 1, 1, '', '', 35, 197);
$pdf->SetFont('times', '', 8);
//$pdf->MultiCell(25, 0,$FIL, 1, 1, '', '', 73, 197);
//$pdf->MultiCell(16, 0,$IND, 1, 1, '', 0, 99, 197);
$pdf->MultiCell(36, 0,$LOC, 1, 1, '', '', 100, 197);
//$pdf->MultiCell(7, 0,$PRO, 1, 1, '', '', 151, 197);
$pdf->MultiCell(45, 0,$CC, 1, 1, '', '', 136, 197);
$pdf->MultiCell(30, 0,$IBN, 1, 1, '', 0, 181, 197, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Altri Recapiti', 1, 1, 'C', 0, '', 206);
$pdf->Ln(10);
foreach ({AR} as $AR_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$DERE= {AR.DESCRIZIONE}[$AR_ind];
$TELR= {AR.TELEFONO}[$AR_ind];
$CELR= {AR.CELLULARE}[$AR_ind];
$EMR= {AR.EMAILRECA}[$AR_ind];
$IDR= {AR.Indirizzo}[$AR_ind];
$LOCR= {AR.Citta}[$AR_ind];
$PROR= {AR.ProvReca}[$AR_ind];
$pdf->MultiCell(25, 0,$DERE, 1, 1, '', '', '', 214);
$pdf->MultiCell(25, 0,$TELR, 1, 1, '', '', 41, 214);
$pdf->MultiCell(25, 0,$CELR, 1, 1, '', '', 66, 214);
$pdf->MultiCell(36, 0,$EMR, 1, 1, '', 0, 91, 214);
$pdf->MultiCell(27, 0,$IDR, 1, 1, '', '', 128, 214);
$pdf->MultiCell(22, 0,$LOCR, 1, 1, '', '', 156, 214);
$pdf->MultiCell(10, 0,$PROR, 1, 1, '', 0, 181, 214, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Istruzione di Lavoro', 1, 1, 'C', 0, '', 231);
$pdf->Ln(10);
foreach ({IDL} as $IDL_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
$MODIDL= {IDL.ModalitaBrevi}[$IDL_ind];
$pdf->MultiCell(190, 0,$MODIDL, 1, 1, '', '', '', 238);
$pdf->Ln(0);
}
//$pdf->SetFont('times', '', 8);
//$pdf->MultiCell(90, 0, 'Segue estratto conto nella seconda pagina', 1, 1, '', '', 58, 263, true);
$pdf->AddPage();
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 10);
$pdf->MultiCell(40, 4, 'Descrizione', 1, 1, 'C', 0, '', 10);
$pdf->MultiCell(25, 4, 'Scadenza', 1, 1, 'C', 0, 45, 10);
$pdf->MultiCell(30, 4, 'Importo', 1, 1, 'C', 0, 70, 10);
$pdf->MultiCell(25, 4, 'Importo non scaduto', 1, 1, 'C', 0, 95, 10);
$pdf->MultiCell(25, 4, 'Importo Stornato', 1, 1, 'C', 0, 116, 10);
$pdf->MultiCell(30, 4, 'Nr. Fattura', 1, 1, 'C', 0, 140, 10);
$pdf->MultiCell(25, 4, 'Data Fattura', 1, 1, 'C', 0, 170, 10, true);
$pdf->Ln(7);
foreach ({EC} as $EC_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$DESEC= {EC.DESCRIZIONERECA}[$EC_ind];
$SCAEC= {EC.SCADENZAdet}[$EC_ind];
$IMPEC= {EC.IMPORTOdet}[$EC_ind];
$INTEC= {EC.IMPORTOSdet}[$EC_ind];
$ONEC= {SIMPORTOGdet}[$AR_ind];
$NFAEC= {EC.NUMEROFATTURAdet}[$EC_ind];
$DFAEC= {EC.DELDET}[$EC_ind];
$pdf->MultiCell(29, 4, $DESEC, 1, 1, '', '', '', '');
$pdf->MultiCell(24, 4, $SCAEC, 1, 1, '', '', 45, '');
$pdf->MultiCell(24, 4, $IMPEC, 1, 1, '', '', 70, '');
$pdf->MultiCell(20, 4, $INTEC, 1, 1, '', '', 95, '');
$pdf->MultiCell(23, 4, $ONEC, 1, 1, '', '', 116, '');
$pdf->MultiCell(29, 4, $NFAEC, 1, 1, '', '', 140, '');
$pdf->MultiCell(25, 4, $DFAEC, 1, 1, '', '', 170, '', true);
// example using general stretching and spacing
$pdf->Ln(5);
// }
}
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('Scheda.pdf', 'I');
//============================================================+
// END OF FILE
//============================================================+
//============================================================+
// File name : example_004.php
// Begin : 2008-03-04
// Last Update : 2013-05-14
//
// Description : Example 004 for TCPDF class
// Cell stretching
//
// Author: Nicola Asuni
//
// (c) Copyright:
// Nicola Asuni
// Tecnick.com LTD
// www.tecnick.com
// info@tecnick.com
//============================================================+
/**
* Creates an example PDF TEST document using TCPDF
* @package com.tecnick.tcpdf
* @abstract TCPDF - Example: Cell stretching
* @author Nicola Asuni
* @since 2008-03-04
*/
// Include the main TCPDF library (search for installation path).
//require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor(' Nicola Asuni');
$pdf->SetTitle('Report');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 004', PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
// set font
$pdf->SetFont('times', '', 11);
// set font
$pdf->SetFont('times', 'B', 10);
// add a page
//$pdf->AddPage();
// set cell padding
$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
$pdf->setCellMargins(1, 1, 1, 1);
// set color for background
$pdf->SetFillColor(255, 255, 127);
// add a page
//$pdf->AddPage();
//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
// test Cell stretching
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
$pdf->SetDrawColor(40);
$pdf->SetFillColor(240);
$pdf->SetTextColor(127);
//$pdf->Rect(30, 160, 30, 30, 'DF', $border_style);
$pdf->Rect(30, 160, '', '', 'DF' , $border_style);
//$pdf->Text(30, 40, 'GrayTH');
//$pdf->SetFillColor(0,255,0);
//$pdf->SetTextColor(1,1,1);
$pdf->SetFont('times', 'B', 16);
$pdf->MultiCell(83, 4, {COMMITTENTE}, 8, '', C, 1, '', 7);
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
$pdf->SetDrawColor(40);
$pdf->SetFillColor(240);
$pdf->SetTextColor(127);
//$pdf->Rect(30, 160, 30, 30, 'DF', $border_style);
$pdf->Rect(30, 160, '', '', 'DF' , $border_style);
//$pdf->Text(30, 40, 'Gray');
//$pdf->SetFillColor(0,0,255);
$pdf->SetTextColor(1,1,1);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(70, 4,{FILIALE}, 1, '', L, 1, 99, 9,true);
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(30, 4,{RIFERIMENTOPRATICA}, 1, '', C, 1, 170, 9, true);
$pdf->Ln(60);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(45, 4, 'Garante - Coob.', 1, 1, 'C', 0, '', 28);
$pdf->Ln(10);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', '', 8);
foreach ({GA} as $GA_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$RAGGA= {GA.GARANTE}[$GA_ind];
$INDGA= {GA.INDIRIZZOGARA}[$GA_ind];
$CAPGA= {GA.CAPGARA}[$GA_ind];
$LOCGA= {DL.LOCALITAGARA}[$GA_ind];
$PROGA= {GA.PROVINCIAGARA}[$GA_ind];
$TELGA= {GA.TELEFONOGARA}[$GA_ind];
$EMAGA= {GA.EMAILGARA}[$GA_ind];
$LNGA= {GA.LUOGONASCITAGARA}[$GA_ind];
$DNGA= {GA.DATANASCITAGARA}[$GA_ind];
$CFGA= {GA.CODICEFISCALEGARA}[$GA_ind];
$pdf->MultiCell(100, 0,$RAGGA, 1, 1, '', '', '', 35, true);
$pdf->MultiCell(48, 0,$INDGA, 1, 1, '', '', '', 42);
$pdf->MultiCell(12, 0,$CAPDA, 1, 1, '', '', 65, 42);
$pdf->MultiCell(32, 0,$LOCGA, 1, 1, '', '', 78, 42);
$pdf->MultiCell(6, 0,$PROGA, 1, 1, '', 0, 104, 49, true);
$pdf->MultiCell(27, 0,$TELGA, 1, 1, '', 0, '', 49);
//$pdf->MultiCell(50, 0,$ATEDA, 1, 1, '', 0, 32, 49, true);
$pdf->MultiCell(60, 0,$EMAGA, 1, 1, '', 0, 43, 49, true );
$pdf->MultiCell(44, 0,$LNGA, 1, 1, '', 0, '', 56);
$pdf->MultiCell(20, 0,$DNGA, 1, 1, '', 0, 60, 56);
$pdf->MultiCell(30, 0,$CFGA, 1, 1, '', 0, 80, 56, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 12);
$pdf->MultiCell(80, 4, {RAGIONESOCIALE}, '', 1, '', '', 125, 35, true);
$pdf->Ln(6);
//$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
//$pdf->SetTextColor(1,1,0);
//$pdf->SetFont('times', '', 8);
//$pdf->MultiCell(20, 4, 'Data Scadenza', 1, 1, 'C', 0, '', 40);
//$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
//$pdf->SetTextColor(1,1,0);
//$pdf->SetFont('times', 'B', 10);
//$pdf->MultiCell(40, 0, {DATASCADENZA}, '', 1, '', '', 37, 40);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 10);
$pdf->MultiCell(80, 0, {INDIRIZZO}, '', 1, '', '', 125, '', true);
$pdf->Ln(6);
$pdf->MultiCell(30, 0, {CAP}, '', 1, '', '', 125,'');
$pdf->MultiCell(110, 0, {LOCALITA}, '', 1, '', '', 135, '');
$pdf->MultiCell(20, 0, {PROVINCIA}, '', 1, '', '', 190, '', true);
$pdf->Ln(6);
$pdf->MultiCell(24, 0, 'Contratto Nr.', 1, 1, 'C', 0, '', 20);
$pdf->MultiCell(33, 0, {CONTRATTO}, 1, 1, '', '', 39, 20);
$pdf->MultiCell(33, 0, 'Lotto Interno Nr.', 1, 1, 'C', 0, 73, 20);
$pdf->MultiCell(18, 0, {IDIMPORTAZIONE}, 1, 1, '', '', 106, 20);
$pdf->MultiCell(40, 0, 'Lotto Esterno Nr.', 1, 1, 'C', 0, 125, 20);
$pdf->MultiCell(37, 0, {LOTTO}, 1, 1, '', '', 165, 20, true);
$pdf->Ln(6);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 9);
$pdf->MultiCell(20, 0, 'Data Affido', 1, 1, 'C', 0, 86, 28);
$pdf->MultiCell(30, 0, {DataAffidoG}, 1, 1, '', '', 106, 28);
$pdf->MultiCell(27, 0, 'Data Scadenza', 1, 1, 'C', 0, 142, 28);
$pdf->MultiCell(33, 0, {DataScadenzaG}, 1, 1, '', '', 169, 28, true);
//$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', '');
$pdf->MultiCell(37, 0, 'Data Decorrenza Contr.', 1, 1, 'C', 0, '', 109);
$pdf->MultiCell(33, 0, {DATASTIPULA}, 1, 1, '', '', 53, 109);
$pdf->MultiCell(35, 0, 'Data Termine Contr.', 1, 1, 'C', 0, 86, 109);
$pdf->MultiCell(33, 0, {DATATERMINE}, 1, 1, '', '', 121, 109);
$pdf->MultiCell(20, 0, 'Residuo', 1, 1, 'C', 0, 152, 109);
$pdf->MultiCell(28, 0, {IMPORTORISC}, 1, 1, '', '', 173, 109, true);
$pdf->Ln(6);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(20, 0, 'Dalla Rata', 1, 1, 'C', 0, '', 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(25, 0, {DALLARATA}, 1, 1, '', '', 36, 118);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(23, 0, 'Alla Rata', 1, 1, 'C', 0, 58, 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(25, 0, {ALLARATA}, 1, 1, '', '', 83, 118);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(20, 0, 'Nr. Rate', 1, 1, 'C', 0, 109, 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(10, 0, {NUMERORATE}, 1, 1, '', '', 130, 118);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(28, 0, 'Importo Rata', 1, 1, 'C', 0, 142, 118);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(30, 0, {IMPORTORATA}, 1, 1, '', '', 171, 118, true);
$pdf->Ln(6);
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(1, 1, 1)));
$pdf->SetDrawColor(40);
$pdf->SetFillColor(240);
$pdf->SetTextColor(127);
//$pdf->Rect(30, 160, 30, 30, 'DF', $border_style);
$pdf->Rect(30, 160, '', '', 'DF' , $border_style);
//$pdf->Text(30, 40, 'Gray');
//$pdf->SetFillColor(0,0,255);
$pdf->SetTextColor(1,1,1);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(29, 4, 'IMPORTO1', 1, '', L, 1, 21, 131);
$pdf->MultiCell(30, 4, 'IMPORTO2', 1, 1, 'C', 0, 51, 131);
$pdf->MultiCell(30, 4, 'Altro importo', 1, 1, 'C', 0, 82, 131);
$pdf->MultiCell(30, 4, 'IMPORTO3', 1, 1, 'C', 0, 113, 131);
$pdf->SetFont('times', B, 11);
$pdf->MultiCell(50, 4, 'Totale', 1, 1, 'C', 0, 145, 131, true);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(29, 4, {IMPORTO1}, 1, 1, '', '', 21, 139);
$pdf->MultiCell(30, 4, {IMPORTO2}, 1, 1, '', '', 51, 139);
$pdf->MultiCell(30, 4, {ALTRIMPORTI}, 1, 1, '', '', 82, 139);
$pdf->MultiCell(30, 4, {IMPORTO3}, 1, 1, '', '', 113, 139);
$pdf->SetFont('times', B, 11);
$pdf->MultiCell(50, 4, {TOTALE}, 1, 1, '', '', 145, 139, true);
$pdf->Ln(6);
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', '', 10);
//$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', '');
$pdf->MultiCell(62, 0, 'Luogo Nascita', 1, 1, 'C', 0, '', 68);
$pdf->MultiCell(40, 0, 'Data Nascita', 1, 1, 'C', 0, 78, 68);
$pdf->MultiCell(38, 0, 'Cod. Fiscale - P. IVA.', 1, 1, 'C', 0, 119, 68);
$pdf->MultiCell(40, 0, 'Esposizione', 1, 1, 'C', 0, 160, 68, true);
$pdf->MultiCell(62, 0, {LUOGONASCITA}, 1, 1, '', '', '', 76);
$pdf->MultiCell(40, 0, {DATANASCITA}, 1, 1, '', '', 78, 76);
$pdf->MultiCell(38, 0, {CODICEFISCALE}, 1, 1, '', '', 119, 76);
$pdf->SetFont('times', B, 10);
$pdf->MultiCell(40, 0, {Esposizione}, 1, 1, '', '', 160, 76, true);
$pdf->Ln(6);
$pdf->SetFont('times', '', 10);
$pdf->MultiCell(30, 0, 'Telefono', 1, 1, 'C', 0, '', 85);
$pdf->MultiCell(30, 0, 'Altro Telefono', 1, 1, 'C', 0, 46, 85);
$pdf->MultiCell(30, 0, 'Mobile', 1, 1, 'C', 0, 77, 85);
$pdf->MultiCell(30, 0, 'Fax', 1, 1, 'C', 0, 108, 85);
$pdf->MultiCell(60, 0, 'E-Mail', 1, 1, 'C', 0, 140, 85, true);
$pdf->MultiCell(30, 0, {TELEFONO}, 1, 1, '', '', '', 93);
$pdf->MultiCell(30, 0, {ALTROTELEFONO}, 1, 1, '', '', 46, 93);
$pdf->MultiCell(30, 0, {CELLULARE}, 1, 1, '', '', 77, 93);
$pdf->MultiCell(30, 0, {FAXD}, 1, 1, '', '', 108, 93);
$pdf->MultiCell(60, 0, {EMAIL}, 1, 1, '', '', 140, 93, true);
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Datore Lavoro', 1, 1, 'C', 0, '', 152);
$pdf->Ln(10);
foreach ({DL} as $DL_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$RAGDA= {DL.RAGIONESOCIALE}[$DL_ind];
$INDDA= {DL.INDIRIZZO}[$DL_ind];
$CAPDA= {DL.CAP}[$DL_ind];
$LOCDA= {DL.LOCALITA}[$DL_ind];
$PRODA= {DL.PROVINCIA}[$DL_ind];
$TELDA= {DL.TELEFONO}[$DL_ind];
$ATEDA= {DL.ALTROTELEFONO}[$DL_ind];
$EMADA= {DL.EMAIL}[$DL_ind];
$pdf->MultiCell(40, 0,$RAGDA, 1, 1, '', '', '', 160);
$pdf->MultiCell(36, 0,$INDDA, 1, 1, '', '', 55, 160);
$pdf->MultiCell(11, 0,$CAPDA, 1, 1, '', '', 92, 160);
$pdf->MultiCell(32, 0,$LOCDA, 1, 1, '', '', 104, 160);
$pdf->MultiCell(6, 0,$PRODA, 1, 1, '', 0, 136, 160);
$pdf->MultiCell(20, 0,$TELDA, 1, 1, '', 0, 142, 160);
//$pdf->MultiCell(50, 0,$ATEDA, 1, 1, '', 0, '', 160);
$pdf->MultiCell(50, 0,$EMADA, 1, 1, '', 0, 162, 160, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Bene', 1, 1, 'C', 0, '', 173);
$pdf->Ln(10);
foreach ({BN} as $BN_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$DESC= {BN.DESCRIZIONE}[$DL_ind];
$TIP= {BN.TIPO}[$DL_ind];
$TARG= {BN.TARGA}[$DL_ind];
$MAR= {BN.MARCA}[$DL_ind];
$ADA= {BN.ALTRODATO}[$DL_ind];
$pdf->MultiCell(51, 0,$DESC, 1, 1, '', '', '', 180);
$pdf->MultiCell(36, 0,$TIP, 1, 1, '', '', 66, 180);
$pdf->MultiCell(15, 0,$TARG, 1, 1, '', '', 103, 180);
$pdf->MultiCell(32, 0,$MAR, 1, 1, '', '', 119, 180);
$pdf->MultiCell(56, 0,$ADA, 1, 1, '', 0, 156, 180, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Banca', 1, 1, 'C', 0, '', 189);
$pdf->Ln(10);
foreach ({Bc} as $Bc_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$ABI= {Bc.ABIBANCADEB}[$Bc_ind];
$CAB= {Bc.CABBANCA}[$Bc_ind];
$IST= {Bc.ISTITUTOBANCA}[$Bc_ind];
$FIL= {Bc.FILIALEBANCADEB}[$Bc_ind];
$IND= {Bc.INDIRIZZOBANCA}[$Bc_ind];
$LOC= {Bc.LOCALITABANCA}[$Bc_indnd];
$PRO= {Bc.PROVBANCA}[$Bc_ind];
$CC= {Bc.CONTOCORRENTEBANCA}[$Bc_ind];
$IBN= {Bc.IBANBANCA}[$Bc_ind];
// set general spacing value
// $pdf->setFontSpacing($spacing);
$pdf->MultiCell(10, 0,$ABI, 1, 1, '', '', '', 197);
$pdf->MultiCell(10, 0,$CAB, 1, 1, '', '', 25, 197);
$pdf->SetFont('times', '', 6);
$pdf->MultiCell(65, 0,$IST, 1, 1, '', '', 35, 197);
$pdf->SetFont('times', '', 8);
//$pdf->MultiCell(25, 0,$FIL, 1, 1, '', '', 73, 197);
//$pdf->MultiCell(16, 0,$IND, 1, 1, '', 0, 99, 197);
$pdf->MultiCell(36, 0,$LOC, 1, 1, '', '', 100, 197);
//$pdf->MultiCell(7, 0,$PRO, 1, 1, '', '', 151, 197);
$pdf->MultiCell(45, 0,$CC, 1, 1, '', '', 136, 197);
$pdf->MultiCell(30, 0,$IBN, 1, 1, '', 0, 181, 197, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Altri Recapiti', 1, 1, 'C', 0, '', 206);
$pdf->Ln(10);
foreach ({AR} as $AR_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$DERE= {AR.DESCRIZIONE}[$AR_ind];
$TELR= {AR.TELEFONO}[$AR_ind];
$CELR= {AR.CELLULARE}[$AR_ind];
$EMR= {AR.EMAILRECA}[$AR_ind];
$IDR= {AR.Indirizzo}[$AR_ind];
$LOCR= {AR.Citta}[$AR_ind];
$PROR= {AR.ProvReca}[$AR_ind];
$pdf->MultiCell(25, 0,$DERE, 1, 1, '', '', '', 214);
$pdf->MultiCell(25, 0,$TELR, 1, 1, '', '', 41, 214);
$pdf->MultiCell(25, 0,$CELR, 1, 1, '', '', 66, 214);
$pdf->MultiCell(36, 0,$EMR, 1, 1, '', 0, 91, 214);
$pdf->MultiCell(27, 0,$IDR, 1, 1, '', '', 128, 214);
$pdf->MultiCell(22, 0,$LOCR, 1, 1, '', '', 156, 214);
$pdf->MultiCell(10, 0,$PROR, 1, 1, '', 0, 181, 214, true);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
// $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(0);
// }
}
$pdf->Ln(6);
$pdf->MultiCell(60, 0, 'Istruzione di Lavoro', 1, 1, 'C', 0, '', 231);
$pdf->Ln(10);
foreach ({IDL} as $IDL_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
$MODIDL= {IDL.ModalitaBrevi}[$IDL_ind];
$pdf->MultiCell(190, 0,$MODIDL, 1, 1, '', '', '', 238);
$pdf->Ln(0);
}
//$pdf->SetFont('times', '', 8);
//$pdf->MultiCell(90, 0, 'Segue estratto conto nella seconda pagina', 1, 1, '', '', 58, 263, true);
$pdf->AddPage();
$pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 2, 'color' => array(1, 1, 1)));
//$pdf->SetFillColor(127,55,60);
$pdf->SetTextColor(1,1,0);
$pdf->SetFont('times', 'B', 10);
$pdf->MultiCell(40, 4, 'Descrizione', 1, 1, 'C', 0, '', 10);
$pdf->MultiCell(25, 4, 'Scadenza', 1, 1, 'C', 0, 45, 10);
$pdf->MultiCell(30, 4, 'Importo', 1, 1, 'C', 0, 70, 10);
$pdf->MultiCell(25, 4, 'Importo non scaduto', 1, 1, 'C', 0, 95, 10);
$pdf->MultiCell(25, 4, 'Importo Stornato', 1, 1, 'C', 0, 116, 10);
$pdf->MultiCell(30, 4, 'Nr. Fattura', 1, 1, 'C', 0, 140, 10);
$pdf->MultiCell(25, 4, 'Data Fattura', 1, 1, 'C', 0, 170, 10, true);
$pdf->Ln(7);
foreach ({EC} as $EC_ind => $Dados)
{
$pdf->SetFont('times', '', 8);
// set general stretching (scaling) value
// $pdf->setFontStretching($stretching);
$DESEC= {EC.DESCRIZIONERECA}[$EC_ind];
$SCAEC= {EC.SCADENZAdet}[$EC_ind];
$IMPEC= {EC.IMPORTOdet}[$EC_ind];
$INTEC= {EC.IMPORTOSdet}[$EC_ind];
$ONEC= {SIMPORTOGdet}[$AR_ind];
$NFAEC= {EC.NUMEROFATTURAdet}[$EC_ind];
$DFAEC= {EC.DELDET}[$EC_ind];
$pdf->MultiCell(29, 4, $DESEC, 1, 1, '', '', '', '');
$pdf->MultiCell(24, 4, $SCAEC, 1, 1, '', '', 45, '');
$pdf->MultiCell(24, 4, $IMPEC, 1, 1, '', '', 70, '');
$pdf->MultiCell(20, 4, $INTEC, 1, 1, '', '', 95, '');
$pdf->MultiCell(23, 4, $ONEC, 1, 1, '', '', 116, '');
$pdf->MultiCell(29, 4, $NFAEC, 1, 1, '', '', 140, '');
$pdf->MultiCell(25, 4, $DFAEC, 1, 1, '', '', 170, '', true);
// example using general stretching and spacing
$pdf->Ln(5);
// }
}
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('Scheda.pdf', 'I');
//============================================================+
// END OF FILE
//============================================================+
Re: TCPDF
L'sql ?
Si trova nel menù di sinistra.
Si trova nel menù di sinistra.
Scriptcase supporto e vendita per l'italia
www.scriptcasecommunity.it
www.scriptcasecommunity.it
Re: TCPDF
SELECT
ID,
COMMITTENTEDEB,
FILIALE,
CONTRATTO,
RIFERIMENTO,
LOTTO,
DATAAFFIDO,
DataAffidog
DataScadenzaG,
DATASCADENZA,
NOMINATIVO,
INDIRIZZO,
CAP,
LOCALITA,
PROVINCIA,
DATANASCITA,
LUOGONASCITA,
CODICEFISCALE,
DATASTIPULA,
DATATERMINE,
IMPORTORISC,
DATAIMPORTAZIONE,
NUMERORATE,
IMPORTORATA,
DALLARATA,
ALLARATA,
CAPITALE,
IMPORTO,
ALTRIMPORTI,
IMPORTO2,
TOTALE,
TELEFONO,
ALTROTELEFONO,
FAX,
CELLULARE,
EMAIL,
IDIMPO,
GESTORE,
SCARICATA,
Proroga,
Esposizione,
Sv
FROM
anagrafica
where
ID = [ute]
ID,
COMMITTENTEDEB,
FILIALE,
CONTRATTO,
RIFERIMENTO,
LOTTO,
DATAAFFIDO,
DataAffidog
DataScadenzaG,
DATASCADENZA,
NOMINATIVO,
INDIRIZZO,
CAP,
LOCALITA,
PROVINCIA,
DATANASCITA,
LUOGONASCITA,
CODICEFISCALE,
DATASTIPULA,
DATATERMINE,
IMPORTORISC,
DATAIMPORTAZIONE,
NUMERORATE,
IMPORTORATA,
DALLARATA,
ALLARATA,
CAPITALE,
IMPORTO,
ALTRIMPORTI,
IMPORTO2,
TOTALE,
TELEFONO,
ALTROTELEFONO,
FAX,
CELLULARE,
EMAIL,
IDIMPO,
GESTORE,
SCARICATA,
Proroga,
Esposizione,
Sv
FROM
anagrafica
where
ID = [ute]
Re: TCPDF
BUONASERA, scusate se sull'argomento ci ritorno a singhiozzo, ho capito che l'errore era dovuto all 'sql in quanto non lo riportavo anche nel codice del layout pdf di sc.
ma risolvendo questo problema se ne presenta un'altro devo far partire il pdf dalla maschera ricerca ma inserendo l'sql nel codice del pdf questo non tiene conto della maschera di ricerca come posso ovviare ???
grazie
ma risolvendo questo problema se ne presenta un'altro devo far partire il pdf dalla maschera ricerca ma inserendo l'sql nel codice del pdf questo non tiene conto della maschera di ricerca come posso ovviare ???
grazie
Chi c’è in linea
Visitano il forum: Ahrefs [Bot], Semrush [Bot] e 5 ospiti