I am generating PDFs with TCPDF, I want to save the generated pdf as blob in a MySQL db. What data should I save to the db? Code for PDF page
The answer is right there, in your code:
// Close and output PDF document
// **This method has several options**, check the source code documentation for more information.
$pdf->Output('example_001.pdf', 'I');
From the documentation:
Parameters: (...) string $dest Destination where to send the document. It can take one of the following values: (...) S: return the document as a string. name is ignored.
So, change your code thus:
$pdffilecontent = $pdf->Output('', 'S');
and save that string to the database