Use my theme files to build the template
-
Hi,
I’m trying to do the most straightforward thing I can think of, which is simply output the entire page, as it would in HTML, to PDF.
In trying to achieve this, in wp-content/wp-mpdf-themes/default.php, I’m simply doing a require() of my template for this page type:
<?php ob_start(); require_once(dirname(__FILE__).'/../themes/mytheme/single-posttype.php'); ob_flush();
The page is then displayed, in HTML, exactly as it’s supposed to, but not as PDF. It would appear something is still breaking wp-mpdf:
mPDF error: Some data has already been output to browser, can't send PDF file
What would be the right way to do this? Can I somehow return the output buffer to wp-mpdf as string?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Use my theme files to build the template’ is closed to new replies.