Display PDF And Images in HTML

edited April 2023 in Web Development

Implementation of a PDF file in your HTML webpage is very easy.

  • When embedding a pdf HTML code into a website, the embed tag isn’t used as often as the previous tags because if the user’s browser can’t handle PDF files, the display will be blank.
  • The embed a pdf HTML code method is used when no fallback content needs to be provided.

Code:

$filepath = <?php echo 'file_viewer_name.php?file_path=$po_dir_file_path;?>

 <embed src="<?php echo  $_GET['file_path']?>" width="100%" height="2100px" />


Sign In or Register to comment.