11 Replies Latest reply: Sep 7, 2011 10:32 AM by Neo Teric RSS

    Bundle info load PDF files

    Neo Teric

      I can't figure out how to embed PDF files using bundle info load, to create a self-contained .qvw that can be distributed as a single file.  Here is a sample that resembles my load script:

       

      T1:

      bundle info load * inline [

          name, pdffile

          test, test.pdf

      ];

       

      After saving and reloading this, I have a listbox object which shows the "i" info icon in the caption.  Ideally, I want to reference the embedded test.pdf using a link expression in a straight table, so that I can click on the link for any name and open the corresponding pdffile, something like this in a table expression:

       

      =name & '<url>qmem://name/' & name

       

      But, even in the listbox, the pdf file will not open.  Instead, when I click on the info icon, I get a dialog box with this:

       

      qmem://<6>/<0><C@PI!>P'F-Y;KDMBU,OVM(>

       

      In the straight table expression, first I get a Yes/No dialog box with this:

       

      Approve application for launch? - qmem://name/test

       

      then when I click Yes, I get an OK dialog with this:

       

      Failed to Launch qmem://name/test

       

      The QlikView Reference Manual doesn't offer any help (pp 495-496).  Does anyone know how to get this to work?

        • Bundle info load PDF files
          Leonard Short

          Take a look at the Presidents.qvw file that comes with a full install. Excelent example of how to do a bundle load.

            • Re: Bundle info load PDF files
              Neo Teric

              Thanks for the reply.  I looked at the Presidents.qvw example. 

               

              My code, above, does the same thing, except that I'm trying to load a PDF file, while Presidents.qvw loads .bmp files.

               

              I actually can successfully load an image file using the syntax, above, but I can't make it work with anything else but an image file.

               

              Also, I'd like to refer to the embedded document using the qmem: syntax described in the reference manual, but I can't get that to work, even with an image file. 

                • Re: Bundle info load PDF files
                  Leonard Short

                  Try doing a search on blobs in the help file:

                   

                   

                  Blobs

                  The Blobs page makes it possible to bundle so-called Blobs, Binary Large Objects, in a QlikView application. It is usually a picture, a text file or similar, stored as a single entity in a database management system. The i icon indicates that the field contains a blob. The blobs in the database are listed together with size, in KB, and type in the Blob Viewer. The Blob is previewed next to the list if it is an image. QlikView supports jpg, png, bmp, pdf and rtf blobs.

                  The Bundle... button opens the Bundle dialog where the Key Field for the Blob data is selected and the blob can be resized to fit in the table cell if it is an image. Mark Shrink Images and apply pixel width and height to resize the images to fit. The setting does not handle aspect ratio.

                  Note: It is only possible to bundle Blobs using ODBC.

                   

                  Once you have made your selections of table and fields you may click OK to insert the select statement(s) generated at the cursor position in the QlikView script. Pressing Cancel will abandon changes.

                  Note! The ODBC driver can usually interpret far more complicated select statements than the ones which can be produced by this dialog. An alternative way to generate a more complex select statement is to use a query tool, e.g. Microsoft Query, and graphically make your select statement there. When this is done, copy (CTRL+C) the select statement and paste it (CTRL+V) into the QlikView script. (In MS Query, click the SQL button.)

              • Re: Bundle info load PDF files
                Klaus Skalts

                If your users have access to the folders containing the PDF's use infoload without the bundle-prefix.

                 

                Then launch the documents via a Link in a Straight Table, via an Action in a button or via the information-i in a List-box.

                 

                Will this work for you?

                  • Re: Bundle info load PDF files
                    Neo Teric

                    Klaus -- Thank you for your suggestion.  This similar to what we ended up doing; we used a file URL in a link field, instead, but achieved a similar result.  We would have preferred to embed the PDFs into the .qvw, because we need to distribute the .qvw to remote users.  Now we must distribute not only the .qvw, but all the PDFs in an accompanying folder.  This is more complex and prone to error.

                  • Re: Bundle info load PDF files

                    Hi

                     

                    Is this what you want

                     

                    T1:

                    load * inline [
                    name, val
                    test, test.pdf
                    ]
                    ;



                    INFO LOAD
                    name, val
                    RESIDENT T1;

                     

                     

                    greetsz

                    Chrisz

                      • Re: Bundle info load PDF files
                        Neo Teric

                        chrisz wrote:

                         

                        Hi

                         

                        Is this what you want

                         

                        T1:

                        load * inline [
                        name, val
                        test, test.pdf
                        ]
                        ;



                        INFO LOAD
                        name, val
                        RESIDENT T1;

                         

                         

                        greetsz

                        Chrisz

                         

                        Thanks, but not quite.  The problem is that I want to embed the PDFs in the QVW and have QlikView open the embedded PDFs in a viewer.  But it won't do that.