Created
December 26, 2019 02:07
-
-
Save parzibyte/d2a88d98042fd9c1c1f8f2fd2c862e57 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 "./tabla.php"; | |
$html = ob_get_clean(); | |
$dompdf->loadHtml("<h1>Una imagen</h1><br> | |
<img src='./parzibyte.jpg'/>"); | |
$dompdf->render(); | |
header("Content-type: application/pdf"); | |
header("Content-Disposition: inline; filename=documento.pdf"); | |
echo $dompdf->output(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment