13 Replies Latest reply on Apr 28, 2017 4:25 PM by sherrivance

    PDF viewer tile

    sherrivance

      Has anyone built a document viewer tile that works with uploaded files like a PDF? We have some great PDFs that we'd like to display in a tile on the main body of a certain page type. We don't want to convert those PDFs into Jive documents due to all the design work involved, but we'd like to display them on a page. It seems like displaying a PDF or PPT pre-opened in a tile would be a common need. Should I ask this over in Developer?

        • Re: PDF viewer tile
          historian

          Jive offers a content type called "File" it will handle just about any business doc you throw at it, including PDFs. 

          • Re: PDF viewer tile
            Sarah O'Meara

            It is a bummer that the document viewer tile is for Jive documents only and to my knowledge we do not have a tile to display PDFs (someone correct me if I'm wrong!). I found an idea that is currently in review which you may want to vote on to get more eyes on it!

             

            View PDF In a Tile

            1 person found this helpful
            • Re: PDF viewer tile
              noelwhite

              I do not have a Tile solution for this yet, but wanted to give some info how I solved for this in a widget in case anyone out there wants to see if it can be done in a tile.  Jive's PDF preview can be parsed from the page and displayed where needed.  My Content Viewer widget gets the jive HTML page and parses the DOM looking for the preview, then displays it in an iframe in the viewer pane.  The trick for a tile design is to get the HTML version of a jive page.  Jive may block this a part of its iframe-busting code.  If the tile server is able to get a Jive page, then this should be a relatively easy thing to do.

              1 person found this helpful
                • Re: PDF viewer tile
                  sabrinad

                  Looping in BRENDA PROFFITT-WOLFE who was trying to do something similar on our community with widgets.

                  • Re: PDF viewer tile
                    historian

                    I think the main issue with the Tile will the link to the PDF that needs to be displayed. Jive does a good job of protecting itself from cross site scripting and won't easily let you pull in the the pdf to a viewer. The other choice is to pack the PDF(s) inside the Tile, but that would limit it to displaying a single file or too whatever files you pack in it.

                     

                    tl:dr: I don't think I can Tile'ize your code for this one.

                    • Re: PDF viewer tile
                      BRENDA PROFFITT-WOLFE

                      Noel,

                      We use widgets, and when I follow the link to your "Content Viewer" (GitHub - fmr-llc/jive-content-viewer) what is displayed seems to be information regarding having a table of contents in one window and contents in another.  Am I misreading your response on how to actually get a pdf document to display on a widget please? Any information would be greatly appreciated!

                      Thanks!

                      Brenda

                        • Re: PDF viewer tile
                          noelwhite

                          Hi Brenda,

                          Let me give a bit of background on that widget.  The content viewer widget is our solution for organizing content and displaying it in a single location.  We found that groups would often need to organize content from several groups, spaces, and projects, but not all of the content within those locations would be relevant.  So setting up navigation between those locations was more confusing to the user experience than a solution.  As such, we designed a two piece widget that is driven off of a table of contents (which is just a Jive document with a bullet list).  The widget formats and displays the ToC in one widget on the page in expandable sections.  When a user clicks on one of the content links, it looks up the content page, and then formats it into the viewer panel (another HTML widget on the page).  It will look up and display content into the viewer pane, and users never needs to navigate off that one page.  Also, the ToC document can be modified, and the content viewer will pick up those changes next page refresh.

                           

                          Now, how this relates to the PDF question is that one of the content types it can do this for is an uploaded file of Microsoft content, which displays the document preview.  It parses the content page, and if it finds the preview info ("viewerURL:"), it formats that into an iframe within the viewer panel.  The code is in the content_viewer_widget.js file.  Let me know if you have additional questions.

                            • Re: PDF viewer tile
                              sherrivance

                              This is really great. With Jive moving away from widgets, we are primarily using custom pages and not the Overview page, so what we need is a custom tile. One of our developers may be willing to work on this; if they do, I'll keep y'all posted.