Embed a PDF on a page or in an article

PDFs can be embedded into Pages, News, or Knowledge Base articles.

Existing PDFs will need to be uploaded in the Documents application first as this process requires the unique document ID given to each upload.

A new folder could be created in your directory for these articles specifically where all the relevant PDFs are uploaded and make these easy to find when creating new articles. 

The method for embedding is the same for either application.


 

1. Upload the PDF to the documents application

 

2. Locate and copy the document ID generated by the Intranet in the URL

The document ID for the example PDF is highlighted above, '98'.

(The number given before this in the URL relates to the folder the PDF is in but this number is not needed for embedding, only the document ID at the end)

 


To embed on a page:
 

4. Edit the embed code (below) to include the Document ID (red number)

<iframe name="previewIframe" src="/intranet/documents/preview.php?doc_id=39" style="width:100%;height: 100vh;" frameborder="0"></iframe>

5. Navigate to your chosen page and click to edit

6. Click in whitespace so the components list appears and choose 'Embed'

7. Paste the code into the 'code' option

8. Resize the component to your liking

9. Publish the page and save all changes
 


Additionally, add this to the code to remove the preview index from appearing completely, which is added by the browser.

Users can remove the index themselves on the page as shown in the video above, but this addition allows an administrator to control the view from the start:

<iframe name="previewIframe" src="/intranet/documents/preview.php?doc_id=39" style="width:100%;height: 100vh;" frameborder="0"></iframe>#toolbar=0




To embed in an article:

4. Edit the embed code (below) to include the Document ID (red number)

<iframe name="previewIframe" src="/intranet/documents/preview.php?doc_id=213" style="width:100%; height:500px;" frameborder="0"></iframe>


5. Navigate to your page, KB or News article and edit it or create a new one

6. Fill out the title, category, metadata etc as appropriate

7. Click the 'source' tab and paste the edited embed code:

 

8. When the article is saved as a draft or published, the document is now embedded in the article body

 

9. Repeat as necessary! Edit the embed code to reflect each document's unique ID in order to pull it through correctly
 

Created on 29 March 2021 by Hannah Door. Last modified on 30 November 2023

Was this helpful?  

Share