Note: We used to recommend using Google Docs embed viewer. We stopped recommending this approach in 2018, after all major browsers began supporting displaying PDFs and Google stopped updating the Google Docs embed viewer. We now recommend a basic iFrame, as outlined below.
You can display PDFs inside your articles using an iFrame. This allows you to embed your PDFs inside articles similar to how you can embed YouTube videos using an embed code.
Embedding PDFs is often easier for both authors and readers. Authors don't have to convert the PDFs to web format, and readers can view the PDFs without having to download them. KnowledgeOwl also indexes the content of uploaded PDFs for search so your readers can find articles in search even if the text is inside a PDF.
PDFs or any other files displayed in iframes will not display within the body of KnowledgeOwl-generated PDFs. (For example: if I have an article called "Login instructions", and that article contains a PDF in an iframe, if I then download the PDF KnowledgeOwl automatically generates for "Login instructions", it will display an empty iframe where the embedded PDF is. Iframe content only properly generates while you are online, not viewing a static PDF.)
To embed a PDF in an article using an iframe
- Upload the PDF to KnowledgeOwl to get the URL. You can upload files under Files > Library, or you can upload the file directly into the article. Both will give you the link. A PDF link looks like this:
//dyzz9obi78pm5.cloudfront.net/app/image/id/5b75b38fad121c1c11143be6/n/example-article.pdf
If you've already uploaded the file you want to work with, so it's in your File Library, you can quickly find the URL for that file. - Click on Code View (Source) in the WYSIWYG editor to get to the HTML and paste the following code where you want the PDF to appear.
<iframe src="https://dyzz9obi78pm5.cloudfront.net/app/image/id/5b75b38fad121c1c11143be6/n/example-article.pdf" width="100%" height="750px"></iframe>
- Replace the src URL with the URL of your PDF and save. Be sure to keep the URL in "quotes".
Here's what a PDF looks like embedded in an iframe: