Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. require_once 'libs/dompdf/autoload.inc.php';
  5.  
  6. // reference the Dompdf namespace
  7. use Dompdf\Dompdf;
  8.  
  9. // instantiate and use the dompdf class
  10. $dompdf = new Dompdf();
  11. $dompdf->loadHtmlFile("generation_feuille_mission.php?id=2");
  12.  
  13. // (Optional) Setup the paper size and orientation
  14. $dompdf->setPaper('A4', 'landscape');
  15.  
  16. // Render the HTML as PDF
  17. $dompdf->render();
  18.  
  19. // Output the generated PDF to Browser
  20. $dompdf->stream();
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement