Introduction
Content for knowledge articles should primarily be written out within the content panes of the knowledge article form.
However, there are times where it is helpful and/or expedient to embed a PDF in a viewer within the knowledge article, so that customers can view the document right from the knowledge article. E.g. Embedding vendor documentation.
Note:
|
Instructions
- Attach the PDF to the knowledge article form using the paperclip icon in the main toolbar.
- In the editor toolbar of the field where you want to embed the PDF, click the Source Code button.
- Paste in the following code to create an iFrame.
<p> <iframe id="inlineFrameExample" style="width: 600px; height: 800px;" title="Inline Frame Example" src="/$viewer.do?sysparm_stack=no&sysparm_sys_id=dfc45e281b2aa5145c5ccbf2604bcb76"></iframe> </p>
- Find the sys_id of the PDF by clicking the [View] link at the top of the knowledge article record. A viewer will open, and you can grab the sys_id from the link in that window.
- Replace the sys_id in the link with the one assigned to the attachment PDF.
<p> <iframe id="inlineFrameExample" style="width: 600px; height: 800px;" title="Inline Frame Example" src="/$viewer.do?sysparm_stack=no&sysparm_sys_id=add18da493284e18cdffbf6a7bba10b7"></iframe> </p>
- Your PDF will now be displayed within a frame on your knowledge article. See example below.
Note: You may want to adjust the default height and width values. The max width that should be used is 700 pixels, to ensure that the frame fits on the Portal.