Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <?php
  2. require('fpdf/WriteHTML.php');
  3.  
  4. $pdf = new PDF_HTML();
  5. $pdf->AliasNbPages();
  6. $pdf->SetAutoPageBreak(true, 15);
  7. $pdf->AddPage();
  8. $pdf->SetFont('Arial', '', 10);
  9. $pdf->Cell(18, 10, '', 0);
  10. $pdf->Cell(150, 10, '', 0);
  11. $pdf->SetFont('Arial', '', 9);
  12. $pdf->Ln(5);
  13. $pdf->SetFont('Arial', 'B', 12);
  14. $pdf->Cell(10, 8, 'dato', 50);
  15. $pdf->Ln(10);
  16. $pdf->SetFont('Arial', '', 11);
  17. $pdf->Cell(25, 8, "NIT", 0);
  18. $pdf->Ln(5);
  19. $pdf->Cell(25, 8, "Clle 93 No. 11-26 Bogota D.C.", 0);
  20. $pdf->Ln(23);
  21. $pdf->Cell(80, 8, '', 0);
  22. $pdf->SetFont('Arial', 'B', 14);
  23. $pdf->Cell(25, 8, 'CERTIFICA:', 0);
  24. $pdf->Ln(8);
  25. $pdf->SetFont('Arial', '', 12);
  26. $pdf->Cell(25, 8, utf8_decode('Que durante el año gravable 2018, se le practicó Retención en la Fuente a:'), 0);
  27. $pdf->Ln(8);
  28.  
  29.  
  30. $htmlTable ='<html >
  31. <head>
  32.  
  33. </head>
  34. <body>
  35. <table>
  36. <tr>
  37. <th>titulo</th>
  38. <th>titulo</th>
  39. <th>titulo</th>
  40. </tr>
  41. <tr>
  42. <td>contenido</td>
  43. <td>contenido</td>
  44. <td>contenido</td>
  45. </tr>
  46. <tr>
  47. <td>contenido</td>
  48. <td>contenido</td>
  49. <td>contenido</td>
  50. </tr>
  51. <tr>
  52. <td>contenido</td>
  53. <td>contenido</td>
  54. <td>contenido</td>
  55. </tr>
  56. </table>
  57. </body>
  58. </html>';
  59.  
  60. $pdf->WriteHTML($htmlTable);
  61.  
  62. $pdf->Output('Factura.pdf','D');
  63.  
  64. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement