How to open a pdf file in an <iframe>?

Member

by jasen , in category: Third Party Scripts , 3 months ago

How to open a pdf file in an <iframe>?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by brandy , 3 months ago

@jasen 

To open a PDF file in an , you can use the following HTML code:

1
<iframe src="path_to_your_pdf_file.pdf" width="100%" height="600px"></iframe>


Replace "path_to_your_pdf_file.pdf" with the actual path to your PDF file. This code will create an element that displays the PDF file within it. You can adjust the width and height attributes to customize the size of the as needed.