0
Problem by sending PDF, generated with TCPDF via PHPMailer
I read a lot here and there, but somehow I could'n find a solution. I am trying to send a PDF, generated with TCPDF, as attachment using with PHPMailer. As soon as I try I get the message: "Warning: base64_encode() expects parameter 1 to be string, object given in C:\xampp\htdocs\pap KK\Root\phpmailer-master\src\PHPMailer.php on line 3179", but the mail is Always send. Unfortunatelly the PDF is brocken. It is not empty. As soon as I use: $pdf->Output('e-tickets.pdf', 'D'); it saves a perfect PDF copy, Help, what the heck am I doing wrong... V Here is the Code https://code.sololearn.com/weV2mYEB26y8
1 Antwort
0
Solved! It’s because I was passing the PDF object and not the string representation of it.
correction:
$var = $pdf->Output('e-tickets.pdf', 'S');
[solution through Stackoverflow]