maximum.software
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Error Message in EmailI have found and fixed issues with older versions of PHP. Please update your plugin to version 0.2.3. Please let me know if you still have issues.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Is there a way to post PDF rather than send?I don’t think this would fit with Contact Form 7 integration unless you can find a ‘download attachment on form submission’ type plugin. However, I have plans to write another plugin that would do what you are describing.
For now, what you can do is the following,
1. Create a button that would run a JavaScript function.
2. Create a JavaScript function that would take your form data and submit it to /pdf-fill.php as a POST request with array ‘data’ argument where the keys would match the field names in the PDF form
3. Create php-fill.php in your public_html with the following code,<?php define('WP_USE_THEMES', false); require(dirname(__FILE__).'/wp-load.php'); $data = $_POST['data']; // change this when using a different PDF file $attachment_id = 123; try { if( !class_exists( 'WPCF7_Pdf_Forms' ) ) throw new Exception(__("WPCF7_Pdf_Forms not loaded")); $tempfile = tempnam(get_temp_dir(), "pdf_"); if(!$tempfile) throw new Exception(__("Failed to create a temporary file")); $service = WPCF7_Pdf_Forms::get_instance()->get_service(); if(!$service) throw new Exception(__("Failed to get PDF forms filling service")); $service->api_fill( $tempfile, $attachment_id, $data ); $file = fopen($tempfile,'rb'); if(!$file) throw new Exception(__("Failed to read a temporary file")); header("Content-Type: application/pdf"); header("Content-Length: " . filesize($tempfile)); fpassthru($file); fclose($file); @unlink($tempfile); } catch(Exception $e) { @unlink($tempfile); header($_SERVER['SERVER_PROTOCOL']." 500 Internal Server Error", true, 500); print $e->getMessage(); }
This should do what you are looking for.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Error Message in EmailHm, very strange. This means that the plugin didn’t submit the data argument. Can you send me the version of the plugin that you are using and the output of phpinfo() function to admin at maximum dot software ? I will see if I can reproduce and fix the issue.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] PDF form randomly not attachingI can try to reproduce the problem on my end if you send me the output of your phpinfo(), WordPress version and the list of plugins that you have installed with version information to admin at maximum dot software. Otherwise, if you don’t mind, I can take a look at your setup directly.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] PDF form randomly not attachingI’m sorry to hear that. We will need to debug this issue.
When the plugin fails to communicate with the Pdf.Ninja API or fails to fill the PDF, it attaches an empty PDF and a text file with an error message and the submitted data. Does this happen for you?
A cause can also be another plugin incorrectly hooking into Contact Form 7. Can you confirm this issue exists when you disable all other plugins that integrate with Contact Form 7?
Can you also confirm that the plugin was activated during the time when you received messages without attachments?
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Multiple PDFs – Don’t Send Any Empty OnesProbably next week.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Multiple PDFs – Don’t Send Any Empty OnesI can add this feature in the next release.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] PDF file upload failedThe issue is resolved. The problem was with error reporting.
Maximum file size allowed with the Pdf.Ninja API is 2 MiB (if you are on the free tier). The PRO tier allows PDF file sizes up to 32 MiB.
If you are trying to use a PDF file that is larger than the above limits, you will now get a more user friendly error message.
I recommend minimizing PDF file sizes as much as possible because it will decrease the size of your email messages as well as speed up form submissions on your site.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] PDF file upload failedI can confirm there is a problem with large PDF files, I am working on a fix which I will deploy in a few hours.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] PDF file upload failedSure thing. It looks like the problem is related to something with the PDF file. Please send it to my email (admin at maximum dot software).
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Cannot be activated due to parse error….Strange. I tested with 5.5.33 and it worked for me.
If you don’t mind me asking, what did you need? If it is something simple, I might want to add that functionality to my plugin.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Cannot be activated due to parse error….I released a fix. Let me know if it works for you or not.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Cannot be activated due to parse error….Line 331: https://github.com/maximum-software/wpcf7-pdf-forms/blob/0.2.1/wpcf7-pdf-forms.php#L331
Is this what you have? What version of PHP are you running? Can you send me your phpinfo() output (admin at maximum dot software)? Thanks.
- This reply was modified 7 years, 4 months ago by maximum.software.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Adding current date to PDFExcellent.
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Adding current date to PDFCan you explain a bit more what you are trying to do? Do you want the PDF date field to show the date of the form submission or the current date (when PDF file is opened)? Or user specified date perhaps?
User specified date: https://contactform7.com/date-field/
Submission date: https://contactform7.com/hidden-field/ + some javascript on the web page possibly? Or a special CSS class combined with a JS library.
The link you sent seems to describe how to have the PDF field populate with the current date (of when the PDF file is opened). I haven’t tried it myself but it should work.