In-line .PDF display in Knowledge

Ben Blackburn
Tera Contributor

Still waiting on some way to natively display .PDF files within a knowledge article.  I know there used to be an app on Share that would handle this, but I'm not finding it anymore (and I think it got deprecated).  Currently, I'm having my user base convert the .PDFs to .DOCX, then import those documents using the OOB functionality, but the formatting is never perfect.  I suspect the same challenges will exist if I have them convert to HTML.

Does anyone have a good solution for this?

1 ACCEPTED SOLUTION

Rajesh Kannan G
ServiceNow Employee
ServiceNow Employee

You can use ServiceNow Document Viewer plugin to display PDF in articles. 

 

1. Whitelist iframe tag and src, height, width attributes by updating HTMLSanitizerConfig.

find_real_file.png

2. Enable ServiceNow Document Viewer plugin. I think this requires additional license.

3. Attach PDF file to your article. Use source code button to open HTML Source code of the article and add iframe tag to display PDF in your article. The sysparm_sys_id parameter is the sys_id of your attachment.

find_real_file.png

find_real_file.png

4. Publish your article.

Article will be displayed as shown below.

find_real_file.png

View solution in original post

31 REPLIES 31

Hi,

 

On which table i need to write this Business rule?

Please reply its an urgent requirement for me to view PDF in Article.

 

Thank you,

Robert S

Patrick Montgom
Tera Contributor

When using an <iframe> tag in knowledge articles to embed PDFs, the page automatically jumps to the <iframe> on load.  How can I prevent this from happening?

Sailesh2
Giga Expert

Hi @Rajesh Kannan Gurusamy 

Your solution works like a charm

However I find it difficult for the viewers to read. When I try to find out the Article using Meta tags, I find the article embedded as PDF. However when I click on it, rather than opening it, it is downloading the embedded PDF.

Any thoughts to share?

Thanks

Sailesh

Sailesh,

Make sure you're clicking on the article, not the .PDF link:

find_real_file.png

SusanWinKY
Kilo Sage

Has anyone had issues with links in a PDF embedded via iframe not being clickable?


Susan Williams, Lexmark