Re: [Jason] question about modification to PDF Plugin
Hey Jason,
I'm so dang close, but yet so far. The code below works in that it takes the form data, sends the email and attaches the pdf - however, after clicking submit the browser trys to "Display" and the PDF that comes via email has errors (not properly decoded)...
(BTW: I changed "from, to, subject, message" to "a,b,c,d" because one of those fields is a reserved field or some such thing and was giving me errors)
// PDF VIA EMAIL
$pdf = '';
$url = "http://www.google.com/";
$data = createPDF_fromUrl($url);
createPDF_display('attachment', $data, 'example.pdf');
sendMessage(array(
'from' => @$_REQUEST['a'],
'to' => @$_REQUEST['b'],
'subject' => @$_REQUEST['c'],
'text' => @$_REQUEST['d'],
'attachments' => array(
'example.pdf' => $pdf
)
));
Cheers,
Tim (toledoh.com.au)