Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

junaooaks

gerar arquivo pdf com fpdf

Recommended Posts

ola pessoal eu nao sei como funciona a geração do arquivo estou seguindo um post Clique aqui

 

so que esta aparecendo umas letras muito doida como se eu estivesse tentando abrir o aquivo pdf dentro do word

%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream xœ…WMoÛF¼çW¼K€PÖüþèMq š8©¾¬È•´É•—¤\ä×4è!HŸÚ^‚žÊ?Öy¤hË´ÁØÒòr93oÞ¼•GoŸ8"ŒéúÉ‹ :}í’ëÇ¡‹5½ºà|W¸)%Ž/‚.rzv¡›¶0”ZÚFoÌ ]|:¬ ‚TDîñâmÓì~9=½¾¾µjkÝ(‘™R¬ìø”—?¤8M…Sè'"L¨`ýF#¦äR ' 8ñ„Q¸"Ié¹7æGÖ„'’X$1ű'’¤G±¤å¦û^eZÒ;™iSÉ‚rE˽–Ý×îOCgz¯ º|¶¬dvyBºZ[švA•ªIµÚ´U.Ÿ¯•¶Ë¼Ë“]µŠöRcñ‹ôFZ¬#YîdµÕ¸í¾(«pmºïåÈø@ JX×Ya"b§'µÅNÒN¦&ÙXYãª(“U¦ YªªÁßVmtÿå¸Ï[+«F‘¡µ.™j­JYI1ÁÂñæ1ýõ?ï ÕÝ—Þ|‡…0f3€hY÷ÝߦWJ©kþ¤-%m ¤Ãý?ÛªiIR.¼§‚7ÎM©« oìþ÷ƒw–M÷uÓ­ï,&àýT$Á‰/ÜpžOì‹hðU£,vê¹t߬‚—è=UÝ/%uÕê½,ð:ò˜œ3³1À èC+-:¨À¡g•™BnTU¢´½£—Ïâ…ÿôòDL€"AÒdh˜Š =òÐ{xÿ1 1ª iUõ]'J☸ †>ªL¯P¿BT*^ö5ÏÏœgøÝ,éLît3$¹²•,Wm†BݘÞ]^0áƒ4Jæ{" Böó|YJ›õ'ï¼;€–V÷ó‘åCËÛBôPͨIA™â²Ôj„‰½vƒŽïMf¬íõbA&ðGDþ<|¾Çå¸{3cìËv(u7U®³^áûQ¿6šúî=k­nôŠ‰d2/±wl'4øˆÙI<³$÷ýÔb&^$‚hž ò/{&ëdá>bO×ÞO쉈Kœ#=–(a­êÚXÝÏŠ±}Yö*ÀzH=ìªû÷0àÙ øw…´²ÕàØû3~muó`ðεšKÂc*å&‰ˆKZukG8ÉØÝ ŽxùÝ÷fðማ4˜EŒÇ©A¦ó>™ûsXÙ\ë\ñ¸Ïoeq&É9Qé­©ÑgÒòùÍ8ÌŽ-Ù}+{7a“O-Ìv›œ™Õ|šáPƒd¯ ŽŠj+ûV±i£Ê (ñ¼iÂÈaG0A¨¾Æ/PÊî¦@å¢}„`Ý5ÅÛ[Ýú‘7L1Cr¯™zÝý5ØíÂËÓ-Ân‚) E˜Îc 0ÈïYp§}@ÜšhA üs oÓ0”> endobj 5 0 obj <> endobj 6 0 obj <> stream

 

qual a forma correta para gerar um relatorio de teste com fpdf ?

 

galera eu ainda nao conseguir gerar arquivo em pdf. alguem pode postar uma classe que funcione

 

obrigado

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá junaooaks,

 

utilizo a classe fpdf e funciona muito bem.

Poste o seu código para podermos identificar o erro.

 

Abs.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Brother eu uso esse codigo e é facil de manutenção:

 

<?php
 ############ GERAR PDF ###################################


// Caminho para o arquivo fpdf.php
require_once("fpdf16/fpdf.php");

// New - Novo documento PDF com orientação P - Retrato (Picture) que pode ser também L - Paisagem (Landscape)
$pdf= new FPDF('P');

$pdf-> Open();

// Definindo Fonte
$pdf->SetFont('arial','',10);

//posicao vertical no caso -1 e o limite da margem
$pdf->SetY("-2");

	//::::::::::::::::::Cabecalho::::::::::::::::::::
	$pdf->Cell(0,5,iconv('utf-8','iso-8859-1','Nome qualquer:'),0,0,'L');
	$pdf->Cell(0,5,iconv('utf-8','iso-8859-1','Nome qualquer'),0,1,'R');
	$pdf->Cell(0,0,'',1,1,'L');

	$pdf->Ln(8);		

	$pdf-> SetFont('arial','B',10);
	$pdf->SetFillColor(122,122,122);

	$pdf-> SetFont('Times','B',9);
	$pdf->Cell(18,5,iconv('utf-8','iso-8859-1','Nome qualquer:'),0,0);
	$pdf-> SetFont('Times','',9);
	$pdf->Cell(75,5,iconv('utf-8','iso-8859-1',"$Nome qualquer"),0,1);
	$pdf-> Ln(3);


	$pdf-> SetFont('Times','B',9);
	$pdf->Cell(24,5,iconv('utf-8','iso-8859-1','Nome qualquer:'),0,0);
	$pdf-> SetFont('Times','',9);
	$pdf->Cell(75,5,iconv('utf-8','iso-8859-1',"$Nome qualquer"),0,1);
	$pdf-> Ln(3);


	$pdf-> SetFont('Times','B',9);
	$pdf->Cell(30,5,iconv('utf-8','iso-8859-1','Nome qualquer:'),0,1);
	$pdf-> SetFont('Times','',9);
	$pdf->MultiCell(75,5,iconv('utf-8','iso-8859-1',"$Nome qualquer"),0,1);


	$pdf-> Output("arquivo_pdf.pdf");
?>

 

Aqui você coloca um link ou um botão pra chamar o arquivo gerado:

<a href='arquivo_pdf.pdf'></a>

 

Espero ter ajudado

Compartilhar este post


Link para o post
Compartilhar em outros sites

consegui fazer gerar o arquivo em pdf só que o conteúdo esta todo embolado na mesma linha

 

<?php
//incluindo o arquivo do fpdf
require_once("fpdf/fpdf.php");

//defininfo a fonte !
define('FPDF_FONTPATH','fpdf/font/');

//instancia a classe.. P=Retrato, mm =tipo de medida utilizada no casso milimetros, tipo de folha =A4
$pdf= new FPDF("P","mm","A4");

//define a fonte a ser usada
$pdf->SetFont('arial','',10);

//define o titulo
$pdf->SetTitle("BOLETO PDF");

//assunto
$pdf->SetSubject("Boletos");

// posicao vertical no caso -1.. e o limite da margem
$pdf->SetY("-1");
$titulo="Boleto Sicoob ". date('d/m/Y');

//escreve no pdf largura,altura,conteudo,borda,quebra de linha,alinhamento
$pdf->Cell(0,5,$titulo,0,0,'L');
$pdf->Cell(0,5,'Brsite Internet LTDA',0,1,'R');
$pdf->Cell(0,0,'',1,1,'L');
$pdf->Ln(8);

//hora do conteudo do artigo
$pdf->SetFont('arial','',8);
$boleto="

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
<HTML>
<HEAD>
<TITLE>".$dadosboleto['identificacao']."</TITLE>
<META http-equiv=Content-Type content=text/html charset=UTF-8>
<style type=text/css>
<!--.cp {  font: bold 10px Arial; color: black}
<!--.ti {  font: 9px Arial, Helvetica, sans-serif}
<!--.ld { font: bold 15px Arial; color: #000000}
<!--.ct { FONT: 9px 'Arial Narrow'; COLOR: #000033}
<!--.cn { FONT: 9px Arial; COLOR: black }
<!--.bc { font: bold 20px Arial; color: #000000 }
<!--.ld2 { font: bold 12px Arial; color: #000000 }
--></style>
<script language='JavaScript' type='text/JavaScript'>
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
 if (init==true) with (navigator) {if ((appName=='Netscape')&&(parseInt(appVersion)==4)) {
   document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
 else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<BODY text=#000000 bgColor=#ffffff topMargin=0 rightMargin=0>
<table width='100' border='0' align='center' cellspacing='0'>
 <tr>
   <td width='430' align='left' valign='top'><table width='150' border=0 cellpadding=0 cellspacing=0>
     <tr>
       <td class=cp><span class='campo'>   <img src='imagens/logo-site-brsite.png' alt='' border=0></span></td>
       <td valign=bottom class=cpt></td>
       </tr>
     <tbody>
       <tr>
         <td colspan=2></td>
       </tr>
       <tr>
         <td colspan=2 height='1'><img src=imagens/2.png alt='' width=137 height=1 border=0></td>
       </tr>
     </tbody>
   </table>
     <table cellspacing=0 cellpadding=0 border=0>
     <tbody>
       <tr>
         <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
         <td class=ct valign=top width=130 height=13>Vencimento</td>

       </tr>
       <tr>
         <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
         <td class=cp valign=top align=right width=130 height=12><span class='campo'>".$dadosboleto['data_vencimento']."</span></td>

       </tr>
       <tr>
         <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
         <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
       </tr>
       </tbody>
   </table>
     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>Coop. contratante / Código 
             cedente</td>

         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12><span class='campo'>".$dadosboleto['agencia_codigo']."</span></td>

         </tr>
         <tr>
         <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
         <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
       </tr>
       </tbody>
   </table>
     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>

           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>Nosso 
             número</td>

         </tr>
         <tr>

           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12><span class='campo'>".$dadosboleto['nosso_numero']."</span></td>

         </tr>
         <tr>
         <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
         <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
       </tr>
       </tbody>
   </table>
     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>


          <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>(=) 
             Valor documento</td>

         </tr>
         <tr>

           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=cp valign=top align=right width=130 height=13><span class='campo'>".$dadosboleto['valor_boleto']."</span></td>

         </tr>
         <tr>
         <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
         <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
       </tr>
       </tbody>
   </table>
     <table border=0 cellpadding=0 cellspacing=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>(-) 
             Outras deduções</td>

         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12></td>

         </tr>
         <tr>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
   </table>
     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top height=13 width=130>(+) 
             Mora / Multa</td>

         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12></td>

         </tr>
         <tr>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=129 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
   </table>
     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>(+) 
             Outros acréscimos</td>

         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12></td>

         </tr>
         <tr>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
   </table>
     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>(=) 
             Valor cobrado</td>

         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12></td>

         </tr>
         <tr>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
   </table>
     <table width='137' border=0 cellpadding=0 cellspacing=0>
       <tbody>
         <tr>
           <td class=cp valign=top width=7 height=13></td>
           <td class=ct valign=top width=130 height=13>Sacado</td>

         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12></td>
           <td class=cp valign=top width=130 height=12><span class='campo' style='font-size:10px;'>".$dadosboleto['sacado']."</span></td>

         </tr>
          <tr>
           <td valign=top width=7 height=1></td>
           <td valign=top width=130 height=1></td>
         </tr>
       </tbody>
   </table></td>
   <td width='600' align='center'><table width='543' border=0 cellpadding=0 cellspacing=0>
     <tr>
       <td class=cp width=109><img src='imagens/sicooblogo.gif'></td>
       <td width=2 valign=bottom><img src=imagens/3.png alt='' width=2 height=22 border=0></td>
       <td class=cpt width=35 valign=bottom style='font-size: 13px; font-family: Arial; font-weight:bold;'><div align=center>".$dadosboleto['codigobanco']."</div></td>
       <td width=2 valign=bottom><img src=imagens/3.png alt='' width=2 height=22 border=0></td>
       <td width='500' align=right valign=bottom class=ld style='font-size:13px; font-family:Arial; '>".$dadosboleto['linha_digitavel']."</td>
     </tr>
     <tbody>
       <tr>
       <td colspan=5><img src=imagens/2.png alt=''  width=543 height=1 border=0></td>
       </tr>
     </tbody>
   </table>
     <table width='400' border=0 cellpadding=0 cellspacing=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13></td>
           <td class=ct valign=top width=400 height=13>Local 
             de pagamento</td>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>Vencimento</td>
         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12> </td>
           <td class=cp valign=top width=400 height=12>Pagável 
             em qualquer Banco até o vencimento</td>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12><span class='campo'> ".$dadosboleto['data_vencimento']."</span></td>
         </tr>
         <tr>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=400 height=1><img src=imagens/2.png alt='' width=400 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
     </table>
     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13> </td>
           <td class=ct valign=top width=400 height=13>Cedente</td>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top width=130 height=13>Coop. contratante / Código 
             cedente</td>
         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12> </td>
           <td class=cp valign=top width=400 height=12><span class='campo'>".$dadosboleto['cedente']."</span></td>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right width=130 height=12><span class='campo'>".$dadosboleto['agencia_codigo']."</span></td>
         </tr>
         <tr>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=400 height=1><img src=imagens/2.png alt='' width=400 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
     </table>
     <table cellspacing=0 cellpadding=0 border=0 width='400'>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=13> </td>
           <td width='113'  height=13 valign=top class=ct>Data 
             do documento</td>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td class=ct valign=top  width='153'height=13>Nº documento</td>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='62'  height=13 valign=top class=ct>Espécie 
             doc.</td>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='34'  height=13 valign=top class=ct>Aceite</td>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='82'  height=13 valign=top class=ct>Data 
             processamento</td>
           <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='61' height=13 valign=top class=ct>Nosso 
             número</td>
         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12> </td>
           <td class=cp valign=top  height=12><div align=left> <span class='campo'>".$dadosboleto['data_documento']."</span></div></td>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top width='153' height=12><span class='campo'> ".$dadosboleto['numero_documento']."</span></td>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top height=12><div align=left><span class='campo'>".$dadosboleto['especie_doc']."</span> </div></td>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top height=12><div align=left><span class='campo'>".$dadosboleto['aceite']."</span> </div></td>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top height=12><div align=left> <span class='campo'>".$dadosboleto['data_processamento']."</span></div></td>
           <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td height=12 align=right valign=top class=cp><span class='campo'>".$dadosboleto['nosso_numero']."</span></td>
         </tr>
         <tr>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top height=1><img src=imagens/2.png alt='' width=113 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top height=1><img src=imagens/2.png alt='' width=81 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top height=1><img src=imagens/2.png alt='' width=62 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top height=1><img src=imagens/2.png alt='' width=34 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top height=1><img src=imagens/2.png alt='' width=82 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
     </table>






     <table cellspacing=0 cellpadding=0 border=0 width='543'>
       <tbody>
         <tr>
           <td width='7' valign=top class=ct> </td>
           <td class=ct valign=top COLSPAN='3'>Nº da conta / Respons.</td>
           <td width='7' valign=top class=ct><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='83' valign=top class=ct>Carteira</td>
           <td width='7' valign=top class=ct><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='53' valign=top class=ct>Espécie</td>
           <td width='7' valign=top class=ct><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='60' valign=top class=ct>Quantidade</td>
           <td width='7' valign=top class=ct><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='63' valign=top class=ct> Valor Documento</td>
           <td width='7' valign=top class=ct><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
           <td width='129' valign=top class=ct>(=) 
             Valor doc.</td>
         </tr>
         <tr>
           <td class=cp valign=top> </td>
           <td valign=top class=cp COLSPAN='3'><div align=left> </div></td>
           <td class=cp valign=top><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top ><div align=left> <span class='campo'>".$dadosboleto['carteira']."</span></div></td>
           <td class=cp valign=top><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top ><div align=left><span class='campo'>".$dadosboleto['especie']."</span> </div></td>
           <td class=cp valign=top><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top ><span class='campo'>".$dadosboleto['quantidade']."</span></td>
           <td class=cp valign=top><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top ><span class='campo'>".$dadosboleto['valor_unitario']."</span></td>
           <td class=cp valign=top><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
           <td class=cp valign=top align=right><span class='campo'>".$dadosboleto['valor_boleto']."</span></td>
         </tr>
         <tr>
           <td valign=top><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td width='75' valign=top><img src=imagens/2.png alt='' width=75 height=1 border=0></td>
           <td width='7' valign=top><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td width='31' valign=top><img src=imagens/2.png alt='' width=31 height=1 border=0></td>

           <td valign=top><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=83 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=53 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=60 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=63 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
         </tr>
       </tbody>
     </table>










     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>
           <td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13> </td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12> </td>
               </tr>
               <tr>
                 <td valign=top width=7 height=1></td>
               </tr>
             </tbody>
           </table></td>
           <td valign=top width=397 rowspan=4><font class=ct>Instruções 
             (Texto de responsabilidade do cedente)</font><br>
           <span class=cp> <FONT class=campo>".$dadosboleto['instrucoes1']."<br>
               ".$dadosboleto['instrucoes2']."<br>
               ".$dadosboleto['instrucoes3']."<br>
               ".$dadosboleto['instrucoes4']."</FONT><br>
               <br>
             </span></td>
           <td align=right width=130><table cellspacing=0 cellpadding=0 border=0>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
                 <td class=ct valign=top width=130 height=13>(-) 
                   Outras deduções</td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
                 <td class=cp valign=top align=right width=130 height=12></td>
               </tr>
               <tr>
                 <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
                 <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
               </tr>
             </tbody>
           </table></td>
         </tr>
         <tr>
           <td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13> </td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12> </td>
               </tr>
               <tr>
                 <td valign=top width=7 height=1></td>
               </tr>
             </tbody>
           </table></td>
           <td align=right width=130><table cellspacing=0 cellpadding=0 border=0>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
                 <td class=ct valign=top width=130 height=13>(+) 
                   Mora / Multa</td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
                 <td class=cp valign=top align=right width=130 height=12></td>
               </tr>
               <tr>
                 <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
                 <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
               </tr>
             </tbody>
           </table></td>
         </tr>
         <tr>
           <td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13> </td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12></td>
               </tr>
               <tr>
                 <td valign=top width=7 height=1></td>
               </tr>
             </tbody>
           </table></td>
           <td align=right width=130><table cellspacing=0 cellpadding=0 border=0>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
                 <td class=ct valign=top width=130 height=13>(+) 
                   Outros acréscimos</td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
                 <td class=cp valign=top align=right width=130 height=12></td>
               </tr>
               <tr>
                 <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
                 <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>
               </tr>
             </tbody>
           </table></td>
         </tr>
         <tr>
           <td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13> </td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12> </td>
               </tr>
               <tr>
                 <td valign=top width=7 height=1></td>
               </tr>
             </tbody>
           </table></td>
           <td align=right width=130><table cellspacing=0 cellpadding=0 border=0>
             <tbody>
               <tr>
                 <td class=ct valign=top width=7 height=13><img src=imagens/1.png alt='' width=1 height=13 border=0></td>
                 <td class=ct valign=top width=130 height=13>(=) 
                   Valor cobrado</td>
               </tr>
               <tr>
                 <td class=cp valign=top width=7 height=12><img src=imagens/1.png alt='' width=1 height=12 border=0></td>
                 <td class=cp valign=top align=right width=130 height=12></td>
               </tr>
             </tbody>
           </table></td>
         </tr>
       </tbody>
     </table>


     <table cellspacing=0 cellpadding=0 border=0>
       <tbody>
         <tr>

           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=400 height=1><img src=imagens/2.png alt='' width=400 height=1 border=0></td>
           <td valign=top width=7 height=1><img src=imagens/2.png alt='' width=7 height=1 border=0></td>
           <td valign=top width=130 height=1><img src=imagens/2.png alt='' width=130 height=1 border=0></td>

           <td valign=top height=1><img src=imagens/2.png alt='' height=1 border=0></td>
         </tr>
       </tbody>
     </table>
     <table width='547' border=0 cellpadding=0 cellspacing=0>
       <tbody>
         <tr>
           <td class=ct valign=top width=7 height=12> </td>
           <td class=ct valign=top width=400 height=12>Sacado</td>
         </tr>
         <tr>
           <td class=cp valign=top width=7 height=12> </td>
           <td class=cp valign=top width=400 height=12><span class='campo'>".$dadosboleto['sacado'] ."-". $dadosboleto['cpf']."</span></td>
         </tr>
       </tbody>
     </table>
     <table width='547' border=0 cellpadding=0 cellspacing=0>
       <tbody>
         <tr>
           <td class=cp valign=top width=9 height=12> </td>
           <td class=cp valign=top width=400 height=12><span class='campo'>".$dadosboleto['endereco1']." / ".$dadosboleto['endereco2']."</span></td>
         </tr>
          <tr>
           <td class=ct valign=top width=7 height=1><img src=imagens/2.png alt='' width=9 height=1 border=0></td>
           <td valign=top height=1><img src=imagens/2.png alt='' width=538 height=1 border=0></td>
         </tr>
       </tbody>
     </table>
     <TABLE width='547' border=0 cellPadding=0 cellSpacing=0>
       <TBODY>
         <TR>
           <TD width='292' height=2 align=left vAlign=bottom></TD>
           <TD width='255' height='2' align=right vAlign=top></TD>
         </tr>
         <TR>
           <TD height=50 colspan='2' vAlign=bottom>   "/*. fbarcode($dadosboleto['codigo_barras'])*/."</TD>
         </tr>
       </tbody>
     </table></td>
 </tr>

</table>
<TABLE border=0 align='center' cellPadding=0 cellSpacing=0>
 <TR>
   <TD class=ct ></TD>
 </TR>
 <TBODY>
   <TR>
     <TD class=ct ><img height=1 src=imagens/6.png width=690 border=0></TD>
   </tr>
 </tbody>
</table>
</BODY></HTML>


  ";

//posiciona verticalmente 41mm
$pdf->SetY("20");

//posiciona horizontalmente 10mm
$pdf->SetX("5");

//escreve o conteudo de novo.. parametros posicao inicial,altura,conteudo(*texto),borda,quebra de linha,alinhamento
$pdf->MultiCell(0,0,$boleto,3,1,'J');

//endereco da imagem,posicao X(horizontal),posicao Y(vertical), tamanho altura, tamanho largura
//$pdf->Image("../imagem/logosicoob.jpg", 8,20,20,20);

/*******definindo o rodapé*************************/


//posiciona verticalmente 270mm
$pdf->SetY("270");

//data atual
$data=date("d/m/Y");
$conteudo=$data;
$texto="SISGEW - SISTEMA GESTAO WEB";

//imprime uma celula... largura,altura, texto,borda,quebra de linha, alinhamento
$pdf->Cell(0,0,'',1,1,'L');

//imprime uma celula... largura,altura, texto,borda,quebra de linha, alinhamento
$pdf->Cell(0,5,$texto,0,0,'L');

//imprime uma celula... largura,altura, texto,borda,quebra de linha, alinhamento
$pdf->Cell(0,5,$conteudo,0,1,'R');

//imprime a saida do arquivo..
$pdf->Output("CarneBoleto.pdf","I");

?>

 

como resolver isto.

Compartilhar este post


Link para o post
Compartilhar em outros sites

pessoal apos muita luta consegui mudei de biblioteca estou usando dompdf so que nao consigo fazer o layout ficar certo fica tudo misturado alguem que ja gerou boleto no formato em pdf usando a lib boletophp poderia da umas dicas?

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.