Ask the Community
Groups
Embed a PDF inside a document - Connect IT Community | Kaseya
<main> <article class="userContent"> <p>You can use the Embed Media tool to embed a PDF that you have uploaded to IT Glue.</p> <ol><li>Within your document, upload the PDF into the <strong>Attachments</strong> area. <a rel="nofollow" href="https://kaseya.vanillacommunities.com/kb/articles/aliases/itglue/hc/en-us/articles/360004939778">Learn more about attaching files</a>.</li> <li>Right-click the name of the file and click on <strong>Inspect</strong>.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/DAJKJQ78CSB4/screen-shot-2019-04-26-at-3-25-57-pm.png" alt="Screen_Shot_2019-04-26_at_3_25_57_PM.png" class="embedImage-img importedEmbed-img"></img></li> <li>In the Inspect Element, the <em><a> target</em> attribute will be highlighted. Right-click on the link in the <em>href attribute</em> and click <strong>Copy link address</strong>.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/UEE0EVEWPDW6/screen-shot-2019-04-26-at-3-40-44-pm-png.png" alt="Screen_Shot_2019-04-26_at_3_40_44_PM_png.png" class="embedImage-img importedEmbed-img"></img></li> <li>Create a new <strong>Text</strong> content block.</li> <li>Click the <strong>Embed Media</strong> icon and embed the HTML code in an iframe that points to the PDF URL you noted in step 3.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/V2KQBXC47NHF/embed-media-it-glue.png" alt="Embed_Media_IT_Glue.png" class="embedImage-img importedEmbed-img"></img><br><br> Example:<br><code class="code codeInline" spellcheck="false" tabindex="0"><span class="wysiwyg-font-size-small"><strong><iframe src="</strong>https://mycompany.itglue.com/attachments/1184302?preview=1<strong>" width="100%" height="900px" frameborder="0"></iframe></strong></span></code> </li> <li>Click the checkmark to see the PDF displayed in the newly created iframe.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/ZA74A3CU3DW6/iframe-embed-checkmark.png" alt="Iframe_Embed_Checkmark.png" class="embedImage-img importedEmbed-img"></img></li> <li>Publish the document, and that should now let your team view the scrollable PDF in the same part of screen as the one they'll be reading other information in. The PDF will also display in the public version of the document as long as the browser supports it.</li> </ol><p>This produces:</p> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/KQ273CXHH9RA/example-embedded-pdf-it-glue.png" alt="Example_Embedded_PDF_IT_Glue.png" class="embedImage-img importedEmbed-img"></img></p> <p>Within the viewer, you can zoom in/out, scroll, and rotate the page orientation. You can also print and download the PDF.</p> <p>Embedding PDFs that are not stored in IT Glue</p> <p>Google Drive offers a feature that will let you embed a PDF not stored in IT Glue. The files don't have to be uploaded to Google Drive. You just need to have published your PDF document somewhere on the web so you can get the URL of the stored document. Keep in mind that only files under 25 MB can be previewed with the Google Drive viewer.</p> <p>All Google Drive viewer URLs will use the path <strong><a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fdocs.google.com%2Fviewer">http://docs.google.com/viewer</a></strong>. Your URL then becomes <strong><a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fdocs.google.com%2Fviewer%3Furl%3DyourURLhere">http://docs.google.com/viewer?url=yourURLhere</a></strong>. Since the path accepts an embed parameter, you can embed the PDF viewer in your document with iframes.</p> <p>For example, if you wanted to view the PDF at<br><code class="code codeInline" spellcheck="false" tabindex="0"><span class="wysiwyg-font-size-small">http://www.cs.mcgill.ca/~martin/theses/phd-duala-ekoko-2012.pdf</span></code><br> you would construct the URL to the embedded viewer like so:<br><code class="code codeInline" spellcheck="false" tabindex="0"><strong>http://docs.google.com/viewer?url=</strong>http://www.cs.mcgill.ca/~martin/theses/phd-duala-ekoko-2012.pdf<strong>&embedded=true</strong></code></p> <p>To use this method to embed a PDF, you just place your URL in an iframe element using the following opening and closing tags and this automatically embeds the viewer in your document:<br><code class="code codeInline" spellcheck="false" tabindex="0"><strong><iframe src="http://docs.google.com/viewer?url=</strong>yourURLhere<strong>&embedded=true" width="100%" height="900px" frameborder="0"></iframe></strong></code></p> <p>This produces: </p> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/VICLDQNIBDQE/example-google-viewer-pdf.png" alt="Example_Google_Viewer_PDF.png" class="embedImage-img importedEmbed-img"></img></p> <p>Your embedded file now displays in your IT Glue document with Google Drive viewing tools.</p> <div> <strong>Note:</strong> We do not provide support or troubleshooting for third-party viewing tools. For help using Google Drive tools, refer to Google's help documentation.</div> <p><strong><br>When Chrome won't display your iframe </strong></p> <p>Iframes may work fine in certain browsers but will often get blocked when using Chrome. There's an easy fix to this.</p> <p>This happens because the iframe is from a source other than that of the https page. The person who loads the https page with blocked mixed content will need look for the security icon<img src="https://us.v-cdn.net/6032361/uploads/migrated/RKWH4EI831WL/screenshot-2017-11-19-at-12-56-58-pm.png" alt="Screenshot_2017-11-19_at_12.56.58_PM.png" class="embedImage-img importedEmbed-img"></img>in the address bar of their Chrome browser and click on it. Choosing the hyperlink to "Load unsafe script" will display the iframe.</p> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/QJ57DB6T3QE2/screenshot-2017-11-19-at-12-57-10-pm.png" alt="Screenshot_2017-11-19_at_12.57.10_PM.png" class="embedImage-img importedEmbed-img"></img></p> <p>For documents that you make public, you can also point the user to an http URL instead of https to avoid this warning. As always, make sure that you have the correct URL in your iframe to prevent malicious scripts from running in the browser.</p> <div>IT Glue doesn’t prevent you from displaying content inside an iframe, though for security reasons, we do not allow your iframe to contain any <script> tags.</div> </article> </main>