PHP FPDF in Phpmailer
$pdfdoc = $pdf->Output('', 'S');
...
$mail->addStringAttachment($pdfdoc, 'my-doc.pdf');
Wild Weevil
$pdfdoc = $pdf->Output('', 'S');
...
$mail->addStringAttachment($pdfdoc, 'my-doc.pdf');