HOW TO VIEW A PDF DOCUMENT IN A PORTAL?

tor-werner
Giga Contributor

I have been struggling with this for quite a while now, searched the community and 'googled' for a good solution, but no luck so far. Some say 'it's just a google away', but not for me 😉

I want either an Icon Link widget or an Icon Menu List widget where I can just select the option and then view a PDF document directly. I am hoping someone here has a complete solution and not just tell me to use 'embed the pdf in html5' 🙂 because this is not working at all in any browser 🙂

I have a solution where my PDF document is an attachment in a KB document, but this is not user friendly at all. First I have to press the link to the KB document, then press the link to the attachment and then answer if I want to Open it or Save it.

I have also tried an Icon Link widget with a link to a pdf document in the sys_attachment table:
../sys_attachment.do?sys_id=84fbd7834f50130068528fe18110c755

With this solution I only have to answer if I want to Open it or Save it. If I open it it shows perfectly, BUT then my portal page is disrupted. After I have viewed the PDF document the link to for example 'Order Something' is now https://<my instance>.com/sys_attachment.do?id=sc_home, and it should have been https://<my instance>.com/sp?id=sc_home

The link to 'Knowledge base' is now https://<my instance>.com/sys_attachment.do?id=kb_view2, and it should have been https://<my instance>.com/sp?id=kb_view2

The best solution would be to be able to read the PDF document from a public drive, for example H:/pdfdocuments/mypdf.pdf

Kind regards
Tor

1 REPLY 1

Chandu Telu
Tera Guru
Tera Guru

Hi Tor,

https://community.servicenow.com/community?id=community_question&sys_id=c02383e1dbd8dbc01dcaf3231f9619d7

 

Please check the below link it may help you