Embed a PDF in Help Center articles | The place for Zendesk users to come together and share
Skip to main content
Accepted

Embed a PDF in Help Center articles

Related products:Knowledge
  • December 30, 2015
  • 34 replies
  • 47 views

Show first post

34 replies

Connor15
  • May 27, 2021

Hey 365174939048, I tried your codeblock but I think im missing something here. Does your codeblock automatically use the uploaded attachment and display it or am I supposed to dictate a URL somewhere?


  • May 27, 2021

In my opinion, this article should not be marked Answered.

  1. The original request was a way to embed a pdf - without having to code - like we could when the pdf was an asset. Various solutions provided here are workarounds.
  2. @Jordan Dayton - your code is beautiful but how did you get your pdf on the Zendesk CDN? It doesn't work with pdfs shared from Google drive or OneDrive.
  3. @Thomas Verschoren - That Google article is about exporting a Google Doc to PDF without creating/sharing a PDF. But we have actual PDFs shared so the code doesn't seem like it would work. Before I can test it though, where are you defining your javascript variables you use for the handlebar entries?

Why is this still so hard after all these years?


Nicole17
  • Employee
  • May 28, 2021

Hi Chaz - 

Thanks for the feedback. We've removed the answered tag from the post. 


  • August 17, 2021

@Thomas Verschoren I tried your code but it only works if I install the Chrome extension mentioned in the comment (https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm?hl=en).

Without it, the browser just downloads the PDF - it doesn't display it on the page.

Do you have any suggestions?


Dave12
  • Employee
  • October 14, 2022
Hi everyone, for better visibility to our product team, I've moved this post over to our Feedback - Help Center (Guide) topic.

Brie
  • March 2, 2024

What is the latest update on embedding PDFs to Help Center article content? Have there been any improvements since this feedback was submitted in 2015 (or earlier)? Please let me the latest on the following: 

1. Is there an easy to use code to upload a PDF / embed a PDF in an article? 

2. The option to add an attachment with a preview of the content 

Thanks!


Ryan48
  • Product Manager
  • March 18, 2024

Hey All,

We are working through improve asset management in our product overall. You've probably recently seen the improvements related to article attachments in the media gallery as well as making them compliant with our data locality requirements. We expect to continue to make improvements in the next 6 to 9 months to enable you to at the very least insert icons in the text of the article where users can open the PDF in a new tab or window. We are then working to move from there to embedding directly into the document. There are currently some security concerns related to remote script execution that can be embedded into a PDF document that we are working through with our security team and causing things to take a little bit longer. 

With all that being said, if you need to embed documents today, I recommend the following code snippet which relies on the Google PDF Viewer. You can insert this code in the source code editor

<iframe style="width: 100%; height: 1000px;" src="https://docs.google.com/gview?url={{article_attachment_url}}&amp;embedded=true" frameborder="0"></iframe>

In this snippet, replace {{article_attachment_url}} with the URL of the PDF you've uploaded to the article as an attachment. You can get this URL by opening the article settings, scrolling to the Attachments section. From there you can right click the attachment link and click "Copy link address" or open the attachment in a new tab and copy the URL from the navigation bar of your browser.

Thanks!


Rebecca16
  • December 6, 2024

Has there been any update since the above comment and subsequent @ryan48 update in March 2024? We have PDF's to attach that are not on Google Docs so those solutions will not address the PDF issue. Thank you!


  • January 10, 2025

I have been waiting for the ability to embed PDFs at two separate companies and their help centers since 2018. I think waiting 6+ years is enough time for this feature to be heavily considered.