Enable PHP rendering in DOMPdf (#3019)

This commit is contained in:
Jeroen Peelaerts
2020-12-28 22:19:08 +01:00
committed by jekkos
parent 9e800fa2c3
commit 3acf9056ec
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
function create_pdf($html, $filename = '')
{
// need to enable magic quotes for the
$dompdf = new Dompdf\Dompdf();
$dompdf = new Dompdf\Dompdf(array("isRemoteEnabled" => TRUE, "isPhpEnabled" => TRUE));
$dompdf->loadHtml(str_replace(array("\n", "\r"), '', $html));
$dompdf->render();

View File

@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/invoice_email.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'css/invoice_email.css';?>"/>
</head>
<body>