since we updated the plugin to 7.1.5 we are seeing several error logs which appears to be triggered by a cron job which tries to generate a pdf using Mpdf library.
we had problems in the past in relation to the temporary folder for Mpdf ( see here ) but I am not sure if this is a regression of the same problem or if it’s a different thing.
I’ve traced back the errors and they indeed lead to the same bit of code, which I see has been modified in the latest version of the plugin.
/documents/class-document.php line 2005
$mpdf = new Mpdf\Mpdf($mpdf_args);
the error is: “Warning: Trying to access array offset on value of type null” and it’s actually triggered by some code within the Mpdf class itself (line 162 of /complianz-gdpr/assets/vendor/mpdf/mpdf/src/Otl.php ), which is fired on Mpfd initialisation. That bit of code is related to fonts, similarly to what happened in the past.
there are a few other errors generating from the following logic on class-document where the $mpdf object is then handled, so I think that something goes wrong with the configuration of that object.
If this is related to our setup (see the other thread for details) Is there anything we can do via filters maybe?
thanks!
]]>You’ve been very kind and created a patched version where that functionality is disabled, and it works well for us. Thanks again!
though I was hoping that version 7 would include that patch, but I just checked and it doesn’t seem the case. Am I mistaken? I am looking at line 2991 of the file /class-document.php
We can keep using the patched branch, but it’d be great if we could update to the latest version at some point. Could you maybe just add a filter so we can eventually disable the temp_dir and you won’t have to refactor the default workflow?
many thanks!
]]>I have tried to install the program, it installs normally, but to enter the plugin administrator, I get an error “Critical error” when I check the error I get that it is on line 26 of the file wp-content/plugins/pdf-generator-addon-for-elementor-page-builder/includes/mpdf/psr/log/src/NullLogger.php.
What is the problem?
Additionally, I send you some information about where we have tried to use it.
WordPress versión 6.4.2
Tema activo: MasterStudy (versión 4.8.33)
Plugin actual: PDF Generator Addon for Elementor Page Builder (versión 1.7.2)
PHP versión 8.0.30
First of all, amazing plugin!
I was hoping you could help me resolve an issue.
I’m using a plugin to generate a pdf(it’s using mPdf as its engine) of all the items added in the woocommerce cart and I need to display the value of my editable WCFF textfield inside the pdf.
I’ve been going down a deep rabbit hole trying to figure out how to do this as I first thought the data was stored as post meta when infact it’s stored as cart item data/session data if I’m not wrong? My knowledge about php is very limited so it’s all about trial and error but I just can’t figure this out.
I found a snippet on your website that I tried to use inside my function, but I just get the result “array” back. Also I’m pretty sure using it this way I’m actually outputing the entire cart not just the value of the WCFF field in the cart.
So could you please help me or point me in the right direction to just output the value of the field? It has to be just the value not an array and it has to be pulled from the session data/cart item data since you are able to edit the field in the cart.
I will be forever greatful if you can help me with this! <3
Thank you in advance.
Below you can see my function and maybe figure out what I’m trying to do.
add_filter( 'woocommerce_pdf_catalog_before_product_information', 'show_text_pdf', 10, 2);
function show_text_pdf ($html, $id) {
if( count( WC()->cart->get_cart() ) > 0 ) {
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
if( isset( $cart_item[ "wccaf_fritextutskrift" ] ) ) {
echo $cart_item[ "wccaf_fritextutskrift" ];
}
}
}
$html = 'Position: ' . $cart_item;
return $html;
}
]]>I just installed the free version of this Print & PDF plugin on my testserver and the initial installation works great so far.
In the Misc tab i see a prompt to do an mPDF library upgrade to version 8.0.8 (recommended).
After clicking the upgrade button the upgrade prompt is still there (???). Now generating a pdf file causes a critical error. The cause seems to be that in the directory /wp-content/plugins/pdf-print/ the complete mpdf directory is missing.
How can i do the recommended mpdf upgrade (v 8.0.8) without running into this issue?
I’m running PHP 7.4 and the latest version of WordPress.
Regards, Benny.
]]>I would like to make a setting so that the person who fills out the form (sender) also receives a PDF copy on their email address. How do I set that up? I was in the General settings and selected ‘both’ under “Who send the PDF File”, but it doesn’t work.
Thanks for your help.
]]>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->Output('WC_Cart-2021072...', 'D') #1 /home/vangartc/vangartdecoracion.com/wp-includes/class-wp-hook.php(292): wc_cart_pdf_process_download('') #2 /home/vangartc/vangartdecoracion.com/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #3 /home/vangartc/vangartdecoracion.com/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /home/vangartc/vangartdecoracion.com/wp-includes/template-loader.php(13): do_action('template_redire...') #5 /home/vangartc/vangartdecoracion.com/wp-blog-header.php(19): require_once('/home/vangartc/...') #6 /home/vangartc/vangartdecoracion.com/index.php(17): require('/home/vangartc/...') #7 {main} thrown in /home/vangartc/vangartdecoracion.com/wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Mpdf.php on line 9547
Settings:
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.
I don’t now if this error came with the last update. but as far as I remember that was about a week ago.
Despite the error, this is really a great plugin!!
Hope someone can help, thanks.
]]>When submitting the CF7 form, the PDF gets generated correctly in the /plugins/generate-pdf-using-contact-form-7/attachments directory.
But the response text of CF7 after submission does not contain any link to the PDF file, it just shows our normal plain response text. And also, neither the Admin e-mail nor the client e-mail (“Mail 2”) has any PDF attachments or links.
So our problem is, the PDF is generated but is not added anywhere.
What could be the reason? We use latest WordPress 5.6.2, Neighborhood Theme Version: 3.6.22 by Swift Ideas, Contact Form 7 Version 5.4 and your Plugin (Generate PDF using Contact Form 7) Version 1.9.9.
Thank you!
]]>