Skip to main content
Enclosing PDFs on your webpage

Curious on how to use HTML code to publish PDFs on your webpage? Read how here!

Updated over a week ago

With Congressus you can easily enclose PDFs on your website. You can enclose the entire PDF file and show it on your website. This article will explain step-by-step how you can enclose a PDF on your website.

Enclosing a PDF file

In order to enclose a PDF file you need to take the following steps:

  1. Upload the PDF file to media - Navigate to 'Media' and click on 'add files' and upload your PDF file

  2. Copy the download link of the PDF file - After you have uploaded your file hover your mouse over the file and click on the pencil icon to edit the file. Copy the link next to 'download link'


3. Add a HTML block to your webpage - Go to 'websites' and go to the webpage where you want to enclose the PDF or create a new webpage. Click on 'add content' and choose for HTML

4. Add the HTML code - (replace the address between brackets with the earlier mentioned downloadlink)

<iframe src="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" width="100%" height="1000px"></iframe>


โ€‹Short explanation of the code: An iFrame allows you to process a file or website on webpage. In this case we process a PDF file on the webpage. The attributes width and height decide the dimensions of the window. So if you want the file to be smaller or larger you can change the percentage points or pixel values.

After you have completed all the steps, it should look like this:
โ€‹


Related Articles

  • Adding an image to your webpage

  • Adding a video to your webpage

Did this answer your question?