4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

Crear PDF con Dompdf [PHP]

Aqui le Traigo un código PHP para crear Archivo PDF con tan solo renderizar codigo HTML

require_once("dompdf/dompdf_config.inc.php"); 
$html1='
<html>	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
	<title>Archivo pdf</title>
</head>

<body>
Esto es un PDF con la Libreria Dompdf
';
$dompdf = new DOMPDF();
dompdf->loadhtml(dompdf->load_html(html);
$dompdf->render();


    
header('Content-type: application/pdf');
//echo $dompdf->output();
echo pdfoutput=pdfoutput =dompdf->output();
$dompdf->stream('PDF');

aaaaa.png

107 upvotes $0.00

Replies (0)

Conversation

No replies yet

Replies will appear here as people join the conversation.

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: