i made pdf.php file in /controller/checkout/
Code: Select all
<?php
class ControllerCheckoutPdf extends Controller {
public function index() {
require_once(DIR_SYSTEM . '/library/mpdf/vendor/autoload.php'); // Include mdpf
$html = '<div id="pdf-content"> Content to display </div>';
$mpdf = new mPDF('utf-8', 'A4-P');
$mpdf->SetHTMLHeader('<div class="pdf-header"><img class="left" src="image/catalog/logos/logo.png"/> </div>');
$mpdf->SetHTMLFooter('<div class="pdf-footer" align="right"> </div> <div style="font-size:90%">Footer</div>');
$mpdf->WriteHTML($html);
$mpdf->Output();
}
}
?>
Code: Select all
<div><a href="<?php echo $pdf; ?>" class="btn btn-default"><?php echo $text_pdf; ?></a>
i want to make pdf with Shopping Cart items like invoice to download from Shopping Cart without login