{"id":14711837,"date":"2021-07-28T18:27:11","date_gmt":"2021-07-28T18:27:11","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/error-with-mpdf\/"},"modified":"2021-07-28T18:31:30","modified_gmt":"2021-07-28T18:31:30","slug":"error-with-mpdf","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/error-with-mpdf\/","title":{"rendered":"Error with MPDF"},"content":{"rendered":"<p>The plugin was working great. But suddendly stopped working and now returns a blank page with error:<br \/>\n<code>Fatal error: Uncaught Mpdf\\MpdfException: Data has already been sent to output, unable to output PDF file in \/home\/vangartc\/vangartdecoracion.com\/wp-content\/plugins\/wc-cart-pdf\/vendor\/mpdf\/mpdf\/src\/Mpdf.php:9547 Stack trace: #0 \/home\/vangartc\/vangartdecoracion.com\/wp-content\/plugins\/wc-cart-pdf\/wc-cart-pdf.php(176): Mpdf\\Mpdf-&gt;Output(&#039;WC_Cart-2021072...&#039;, &#039;D&#039;) #1 \/home\/vangartc\/vangartdecoracion.com\/wp-includes\/class-wp-hook.php(292): wc_cart_pdf_process_download(&#039;&#039;) #2 \/home\/vangartc\/vangartdecoracion.com\/wp-includes\/class-wp-hook.php(316): WP_Hook-&gt;apply_filters(NULL, Array) #3 \/home\/vangartc\/vangartdecoracion.com\/wp-includes\/plugin.php(484): WP_Hook-&gt;do_action(Array) #4 \/home\/vangartc\/vangartdecoracion.com\/wp-includes\/template-loader.php(13): do_action(&#039;template_redire...&#039;) #5 \/home\/vangartc\/vangartdecoracion.com\/wp-blog-header.php(19): require_once(&#039;\/home\/vangartc\/...&#039;) #6 \/home\/vangartc\/vangartdecoracion.com\/index.php(17): require(&#039;\/home\/vangartc\/...&#039;) #7 {main} thrown in \/home\/vangartc\/vangartdecoracion.com\/wp-content\/plugins\/wc-cart-pdf\/vendor\/mpdf\/mpdf\/src\/Mpdf.php on line 9547<\/code><\/p>\n<p>Settings:<\/p>\n<ul>\n<li>WordPress 5.7.2<\/li>\n<li>Woocommerce 5.1.1<\/li>\n<li>Woocommerce CartPDF 2.1.3<\/li>\n<li>Send copy to admin enabled<\/li>\n<li>Using a personalized template to add more data  to the pdf<\/li>\n<li>Also using a custom function to adds customer ID to filename for logged-in users<\/li>\n<\/ul>\n<p>I tried disabling all plugins except for WC itself and WCPDF and also disabling my custom scripts and template, but the same happens. I searched the forum and saw a thread from a year ago with the same issue, but no info in there, nor a posibble solution.<\/p>\n<p>I don&#8217;t now if this error came with the last update. but as far as I remember that was about a week ago.<\/p>\n<p>Despite the error, this is really a great plugin!!<\/p>\n<p>Hope someone can help, thanks.<\/p>\n","protected":false},"template":"","class_list":["post-14711837","topic","type-topic","status-publish","hentry","topic-tag-mpdf","topic-tag-pdf"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14711837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14711837\/revisions"}],"predecessor-version":[{"id":14711851,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14711837\/revisions\/14711851"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=14711837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}