html pdf viewer code example

Example 1: html embed a pdf

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <h1>PDF Example with iframe</h1>
  
 		   
    <iframe src="link/to/your.pdf" width="100%" height="500px">
    </iframe>
 
  
  </body>
</html>

<!-- insta: @hardcode_studios -->

Example 2: insérer pdf dans html

<embed src=http://monsite.fr/monfichier.pdf width=800 height=500 type='application/pdf'/>

Example 3: open pdf in browser javascript

<a href="#" onclick="window.open('MyPDF.pdf', '_blank', 'fullscreen=yes'); return false;">MyPDF</a>

Example 4: html to pdf

press ctrl+p then select save as pdf then enter

Example 5: html to pdf

<!--why not try -->
<!--
HiQPdf Software
-->