Created
December 27, 2019 15:39
-
-
Save parzibyte/244c1a83cd8933dd859a21fc820cbc56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once "./vendor/autoload.php"; | |
use Dompdf\Dompdf; | |
$dompdf = new Dompdf(); | |
ob_start(); | |
include "./factura.php"; | |
$html = ob_get_clean(); | |
$dompdf->loadHtml($html); | |
$dompdf->render(); | |
header("Content-type: application/pdf"); | |
header("Content-Disposition: inline; filename=factura.pdf"); | |
echo $dompdf->output(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment