14 Replies Latest reply on Jan 6, 2011 7:39 AM by ErichWetzel

    View pdf files in container fields

    Sutaxer

      Title

      View pdf files in container fields

      Post

      Simple question:  I loaded pdf files in a container field.  How do I view the file?

       

      Using FileMaker Pro 11

        • 1. Re: View pdf files in container fields
          philmodjunk

          That depends on how you inserted it.

           

          A store by reference PDF file can be opened by double-clicking the container field. Store by reference just stores the file path to the file, you still have to keep it as a separate file and you can't change it's name or move it without your container field losing access to the file.

           

          If the file is physically stored in the container, you can use Export Field Contents to open the file. You can click in the field and select this option from the edit menu or you can create a script that does this for you.

          • 2. Re: View pdf files in container fields
            Sutaxer

            Thank you.

            • 3. Re: View pdf files in container fields
              kingsley47

              How can I physically store the pdf in ther container field? Also, what will that look like? What i want is for the PDF to show up as a page in the record. Am I going about this the right way by trying to physically save the pdf to a container field?

              • 4. Re: View pdf files in container fields
                ErichWetzel

                kingsley47

                If you want to see the document itself in the field you must copy and paste it.  That is: open the PDF, copy the page, go to your database, select the container field you want the document to appear in and paste.  When you browse the database you will see the actual documents.  This can be a problem if you have PDFs with more than one page you want to see.  FileMaker does not appear to be able to import a PDF and then show the multiple pages in it.  We do this with a related table containing only documents so that there can be many related to each record.

                Alternately, if you have a document that is more than one page, you insert the file itself in to the container field by selecting the field and choosing Insert > File ... and selecting as appropriate.  However, all you will see in the database is a PDF file Icon in the field.  You will have to export it as is explained above to see its contents.

                Hope this helps - Erich

                • 5. Re: View pdf files in container fields
                  tiptronic1

                  Copy/Pasting the pdf creates a jpeg, which is less than optimal, if you want to keep the file for archiving purposes... So it seems we're stuck here:

                  - Either view the pdf in the record, but it is no longer a pdf, but a jpeg file

                  - or view a dummy icon of the pdf, but the pdf is still intact

                  I mean: it's 2011...  Stirnrunzelnd

                  Not good!

                  • 6. Re: View pdf files in container fields
                    Sorbsbuster

                    If I read correctly that you want to connect a pdf file (or files) to a record, and view it directly on the FM layout, then I wouldn't start from there (the Container Field approach, that is).  Instead if you create a web viewer field and direct it to the URL of the pdf's location (which can be by calculation) it will happily display the complete pdf file, just as if you were viewing a pdf file using your browser.  Which... you are.

                    All the pdf viewer's tools (I used Adobe Acrobat Reader, for example) are there for the user to control.  In other words, make the webviewer field the size you want to view, and you can let the user browse, scroll, jump pages, whatever.

                    If you have security settings in the pdf they will carry through and be honoured as well.

                    Gotcha to look out for: avoid spaces in path names (although there is probably a way round that, like substituting %20, or whatever - would appreciate if someone could tell me how to make that work.).

                    (And because of exploding file size I would recommend you only ever store a reference to the pdfs.)

                    Sorry - clarification: when using the web-viewer approach the pdf is by  definition stored as a reference.  It's only if you still wanted to  pursue storing any documents in a container field.

                    • 7. Re: View pdf files in container fields
                      tiptronic1

                      Hi Sorbsbuster,

                      thanks for the hint, but if I understand correctly, I must save my pdf's externally then. I'd rather have those files internally in the database, since I want to use that file mainly on 'Filemaker Pro' for iPad. Can this be done? And if not - how would I move the (external) files to the iPad?

                      thx

                      • 8. Re: View pdf files in container fields
                        stcav

                        Hi Tiptronic,

                        I keep my desktop and laptop synchronised so the file structure (for user files) is identical (I've just switched over to GoodSync to do this). Consequently, if the FM database references other files, such as your pdf's, within this file structure it will work on both machines.

                        However, this process requires you to use only one machine at a time, so be rigourous about this.

                        Stephen

                        • 9. Re: View pdf files in container fields
                          tiptronic1

                          Hi Stephen,

                          I am carrying my file on a small portable drive, so my Desktop and laptop are automatically using the same data :-)... But I am wondering how to sync that to my iPad - there's where I finally need the pdf-archive most.

                          I couldn't figure out how to initially show the pdfs in FMPro AND sync them to FMPro on the go (for iPad) - no matter if they are stored inside the FM-database or linked as an external file.

                          andy

                          • 10. Re: View pdf files in container fields
                            stcav

                            Andy,

                            You might be beyond me here, since I know nothing about iPads! GoodSync would allow you to control changes so that all three (desktop, laptop and iPad) would be updated when a change was made on any one of them, provided they were connected periodically in some way over a network. I assume an iPad could connect over a wireless network, so you could copy your directory structure to all three, then the portable drive would access the directory containing your pdfs on whichever platform it was connected.

                            My comments have little to do with Filemaker, but if you want to explore further I found GoodSync here: http://www.goodsync.com/mac. I'm still in the 30 day evaluation, but I'm impressed so far.

                            • 11. Re: View pdf files in container fields
                              ErichWetzel

                              Tiptronic,

                              You said above that the PDF is converted to a jpeg when it is copied and pasted into a container.  

                              I just tested the contents of our containers of documents and copied and pasted a PDF page.  Then, I exported the field contents back out of the database, the computer automatically set the output file as a PDF in format.  The exported file acted every bit the PDF as the original PDF that I copied into the database.  In this instance the text in both files was selectable as is typical in a PDF containing text.

                              I repeated the procedure with a jpeg.  Copied and pasted it in, exported it out.  It was automatically exported as a jpeg.  Text was not selectable as is typical in a jpeg.

                              Are you sure about that conversion to jpg you mentioned?  Or did I misunderstand something?

                              -Erich

                              • 12. Re: View pdf files in container fields
                                Sorbsbuster

                                The Webviewer approach will work (on an FM Client - I am assuming there is no issue with it running on an iPad)  So, surely all you are left with is the sync-ing problem between the various bits of hardware you want to view them on?  Will you not have to address that issue no matter whether they are stored internally, externally referenced, container field, or not?

                                What about using dropbox between all of the hardware?

                                http://www.dropbox.com/

                                • 13. Re: View pdf files in container fields
                                  tiptronic

                                  Hi Erich,

                                  yes, I am sure. If you open the database from the iPad and select 'Open' from the media-viewer, it is blurred and clearly shows 'myimagename.jpeg'... The conversion seems to happen when opening the database from the iPad - on the computer the pdf stays intact.

                                  @Sorbsbuster: Please note: I am looking for this approach, because I want to use the database as an offline data archive (e.g. receipts, invoices, etc...) on my iPad. I use a large Dropbox, but this is for offline usage far less than optimal Cool

                                  Interestingly this is what happens:

                                  - If I select 'Open in...' (e.g. with GoodReader), the file gets opened in GoodReader als 'myimagename.jpeg' 

                                  - If I copy the media-field on the iPad and paste it into the media-field of another record and open it on my Mac, the file is again opened as intact pdf. It seems the file keeps it's original binary data, but is shown as Jpeg in the iPad app - most likely due to iOS backward compatibility. Which doesn't make it less annoying, since especially on the iPad the better resolution and scalability of the pdf is urgently needed.

                                  IMHO this is far less than optimal. I think I'll create an offline database by myself using SQLite and some Javascript. The time I spent for finding all these quirks could have better been spent....

                                  Most likely I will use Bento for the time being, as Bento at least syncs with my computers and let me view the pdfs using the built-in pdf-viewer.

                                  Thanks everybody for the input - and please keep the ideas coming... Cool

                                  andy

                                  • 14. Re: View pdf files in container fields
                                    ErichWetzel

                                    Andy,

                                    I got it now.  I missed the iPad detail.  Thanks for clarifying.  It does seem odd that its working that way since the devices can work with PDFs easily.

                                    -Erich