/** * insere header na devolutiva * * @depends FPDF */ public function defineHeader() { $this->objMakePdf->SetTextColor(51, 51, 51); $this->objMakePdf->SetDrawColor(51, 51, 51); $this->objMakePdf->SetLineWidth(0.2); $this->objMakePdf->Image($this->objMakePdf->public_path . $this->objMakePdf->getLogotipoEmpresa(), 10, 4, 50); //$this->objMakePdf->Image($this->objMakePdf->public_path.$this->objMakePdf->getLogotipoQualidade(),52,10,25); $this->objMakePdf->SetFont('Arial', 'B', 11); //$tmpTxt = substr($this->headerTitle,0.110); $tmpTxt = substr("{$this->objMakePdf->getHeaderTitle()}", 0.11); //$this->Cell(80,10,utf8_decode($tmpTxt),0,0,'R'); $this->objMakePdf->setXY(80, 10); $this->objMakePdf->MultiCell(120, 5, utf8_decode($tmpTxt), 0, 'R'); $this->objMakePdf->Ln(15); }
public function defineApresentacao() { $apres = $this->objMakePdf->getTexts()->presentation; $texto1 = utf8_decode($apres->texto1); $texto2 = utf8_decode($apres->texto2); $texto3 = utf8_decode($apres->texto3); $texto4 = utf8_decode($apres->texto4); $texto5 = utf8_decode($apres->texto5); $texto6 = utf8_decode($apres->texto6); $this->objMakePdf->AddPage(); $fonte = 'Arial'; $this->objMakePdf->SetTextColor(51, 51, 51); $this->objMakePdf->SetFont($fonte, 'B', 10); // var_dump('---------arrEnterprise------------',$this->objDevolutive->getArrEnterprise()); // // echo "<br><BR>"; // var_dump('-------arrContact-----------',$this->objDevolutive->getArrContact()); // // exit; $arrEnterprise = $this->objDevolutive->getArrEnterprise(); $arrContact = $this->objDevolutive->getArrContact(); $cpfEmpreendedora = "CPF da Empreendedora: " . $arrContact['Cpf']; $prezadaEmpresaria = "Prezada " . $arrContact['Nome']; //mostra somente se nao for produtor rural if (!$this->identificaProdutorRural()) { $cnpjEmpresa = "CNPJ da Empresa: " . $arrEnterprise['CPF/CNPJ']; $this->objMakePdf->MultiCell(190, 5, $cnpjEmpresa, 0, "J"); $this->objMakePdf->ln(3); } $this->objMakePdf->MultiCell(190, 5, $cpfEmpreendedora, 0, "J"); $this->objMakePdf->ln(4); $this->objMakePdf->MultiCell(190, 5, $texto1, 0, "J"); $this->objMakePdf->ln(3); //$this->objMakePdf->MultiCell(190,5,$texto2,0,"J"); $this->objMakePdf->MultiCell(190, 5, $prezadaEmpresaria, 0, "J"); $this->objMakePdf->ln(5); $this->objMakePdf->SetFont($fonte, '', 9); $this->objMakePdf->MultiCell(190, 5, $texto3, 0, "J"); $this->objMakePdf->ln(3); $this->objMakePdf->MultiCell(190, 5, $texto4, 0, "J"); $this->objMakePdf->ln(8); $this->objMakePdf->SetFont($fonte, 'B', 9); $this->objMakePdf->MultiCell(190, 5, $texto5, 0, "J"); $this->objMakePdf->ln(3); $this->objMakePdf->MultiCell(190, 5, $texto6, 0, "J"); }
/** * insere footer na devolutiva * * @depends FPDF */ public function defineFooter() { $this->objMakePdf->SetTextColor(51, 51, 51); $this->objMakePdf->SetDrawColor(51, 51, 51); $this->objMakePdf->SetLineWidth(0.2); $this->objMakePdf->line(10, 279, 200, 279); #$this->objMakePdf->line(10,280,200,280); $this->objMakePdf->SetXY(10, -15); #-15); $this->objMakePdf->SetFont('Arial', 'BI', 7); $mm_distancia_da_margem_esquerda_img1 = 102; $mm_distancia_do_topo_img1 = 280; $mm_largura_img1 = 100; $imagemFooter = $this->objMakePdf->public_path . $this->objMakePdf->getImagemFooter(); $this->objMakePdf->Image($imagemFooter, $mm_distancia_da_margem_esquerda_img1, $mm_distancia_do_topo_img1, $mm_largura_img1); $this->objMakePdf->SetFont('Arial', 'BI', 8); $this->objMakePdf->SetXY(30, -17); $this->objMakePdf->Cell(20, 10, utf8_decode("{$this->objMakePdf->getEmissao_data()}"), 0, 0, 'C'); $this->objMakePdf->SetXY(9, -17); $this->objMakePdf->Cell(8, 10, $this->objMakePdf->PageNo() . '/{nb}', 0, 0, 'C'); }