The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Output submitted form as a PDF attachment - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Output submitted form as a PDF attachment (/showthread.php?tid=1897) |
Output submitted form as a PDF attachment - antonitus - Feb 13th, 2012 Is there any way to output a submitted form as a PDF email attachment? RE: Output submitted form as a PDF attachment - Ben - Feb 17th, 2012 Hi Antonitus, I'm afraid not. In the past, I've had this requested from a few clients - and even hacked together a custom solution for one of them, but there's nothing on the roadmap for adding this just yet. Sorry about that! - Ben RE: Output submitted form as a PDF attachment - pegaspar - Mar 11th, 2015 I did that by using fpdf library. In the email template i have included PHP code that creates PDF, stores it in a temporary file and then attaches it to the mail. Example of the HTML Template for the mail: {php} global $fields; require ('path/scripts/fpdf17/fpdf.php'); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World!'); $pdf->Output('temp/form.pdf'); {/php} {$attachment file="/temp/form.pdf"} <p> Thanks for your submission! </p> |