Changes between Version 4 and Version 5 of WF/Relatoriospdf


Ignore:
Timestamp:
08/24/07 14:13:05 (17 years ago)
Author:
viani
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WF/Relatoriospdf

    v4 v5  
    101101$codigoPDF = $pdf->Output(); 
    102102}}} 
     103 
     104'''Exemplo utilizando atividades e Mvc:''' 
     105 
     106No template da Atividade: 
     107{{{ 
     108{wf_download_link getParams="action=pdf" text="gerar pdf"} 
     109}}} 
     110 
     111No controller da Atividade: 
     112{{{ 
     113function pdf() 
     114{ 
     115   $this->model->pdfAction(); 
     116} 
     117}}} 
     118 
     119Na Model da Atividade: 
     120{{{ 
     121function pdfAction() 
     122{ 
     123   function enviarArquivo($params) 
     124   { 
     125       $pdf = wf_create_object('wf_fpdf'); 
     126 
     127       $pdf->AddPage(); 
     128       $pdf->SetFont('Arial','B',16); 
     129       $pdf->Cell(40,10,'Hello World!'); 
     130       return array( 
     131           'filename' => 'meu_pdf.pdf', 
     132           'content' => $pdf->Output()); 
     133   } 
     134   wf_handle_download($_GET, "enviarArquivo"); 
     135} 
     136}}}