I found some solution for my issue by googling but none of them worked for me. I want to show a PDF file in a webpage but browser makes user to download it! How can I solve this? My code is below.
<?php
session_start();
$name = $_SESSION['src'];
$file= 'usr/'.$name.'/out.pdf'
?>
<!DOCTYPE html>
<html>
<page size="A4"><embed src=<?php echo $file?> type="application/pdf" width="800px" height="1100px" /></page>
</html>
source https://stackoverflow.com/questions/70524443/force-browser-to-display-pdf-file-instead-of-download
Comments
Post a Comment