I have stored pdf file into database i.e blob type. Now I wanna display pdf like
$sqll=\"select * from pdff\";
$query=mysql_query($sqll) or die(mysql_error()
I know this thread is old but I recently had a similar issue to solve and wrote this quick guide to cover it. https://medium.com/@alexmoran_19787/display-pdf-from-blob-file-11996146dbc0
Basically Depending on if you addslashes or not when inputing the pdf into the database you can view it by the following I had this in my controller and passed the info to a php page. Setting the headers and if you addslashes make sure to stripslashes otherwise you will just end up with the raw data or blank screen.
$content = stripslashes($text["file"]);
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename=document.pdf');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
$this->load->view("administrator/load_pdf", [
"title"=>"Display PDF",
"pdf"=>$content,
]);
This is from the php page.