header("Content-Length: " . filesize ('theme/assets/pdf/ci.pdf' ) ); header("Content-type: application/pdf"); header("Content-disposition: attachment; filename=".basename('theme/assets/pdf/ci.pdf')); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); $filepath = readfile('theme/assets/pdf/ci.pdf');
Hi, I have a code of this type. by my requirement I have to show the downloaded pdf (open pdf in the browser) in the browser, but where now the pdf is downloaded to the hard drive. instead, I would like to view the file in a browser.
source share