1 2 Previous Next 15 Replies Latest reply on Jul 8, 2016 5:01 AM by BillisSaved

    Inserting PDF Files...

    Dobieg5750

      Just wondering if it is easier/better to insert a PDF (actually multiple PDF's - 1 for each record) into a container field or if there is a way to store the PDF on your server and reference it via a hyperlink...wondering about the file size, issues, etc.

        • 1. Re: Inserting PDF Files...
          rgordon

          You can store the PDF in the container or you have an option to store just a reference to the PDF. There is a checkbox you can check in the insert option if you want to store the reference. Both are easy. Better is up to the user to determine.

          1 of 1 people found this helpful
          • 2. Re: Inserting PDF Files...
            Stephen Huston

            What's best depends on your needs and whether or not the file needs to be portable. Using a reference or path can mean the connection is lost if either file is moved or the PDF is renamed. If you need fM portability, store the file IN the container.

            1 of 1 people found this helpful
            • 3. Re: Inserting PDF Files...
              Dobieg5750

              Ok, just making sure. I am building a contract database and each record will have an associated file (PDF Contract) with it and some can be as big as double digit MB and others in the KB range. Just thinking ahead before I get to far into design.

               

              Oh and a rookie so figured I'd shoot out a quick Q.

               

              Thanks both of you!

              • 4. Re: Inserting PDF Files...
                alangodfrey

                As above: Linking by reference creates the potential problem that all users must see the linked path in exactly the same format.

                Embedding the file in the container field gets around that problem, as the whole data set is contained within your FM file.

                 

                I haven't checked this characteristic beyond Version 11, but up to then embedding files in containers exploded the file size to unusable very quickly.  Before you opt for what seems like the 'Easy Option' I'd create a test file with one container field, a few hundred records, and embed your typical files into each record.  Open and close the file.  Check if the file quickly grows by many times more than the added embedded file size.

                 

                Hopefully you will find that FM have fixed the problem and adding a 100MB file into a container only inflates your FM file size by 100MB.  But I'd check...

                • 5. Re: Inserting PDF Files...
                  keywords

                  Further to points already made, have you investigated FM's External Storage? If you are using FMServer (you do mention having a server, but that is not necessarily the same thing) and you leave FM External Storage defaults in place the document files will be stored on the FM Server host machine and will be accessible by any users.

                  • 6. Re: Inserting PDF Files...
                    BillisSaved

                    Good afternoon Dobieg5750,

                     

                    I hope your day is going well. I currently manage a system that has features similar to the needs you have described, and I have found that setting the container field storage settings to External Storage and enabling the secure storage option, as opposed to the open storage option, provided the best solution and user experience. I should mention that my situation does not require the solution to be self-contained (i.e. portable).

                     

                    There are a few "gotchas" to be aware of if you choose this method:

                    • If a user drags and drops the file into the container field, FileMaker will automatically embed the file.
                    • If the user uses the Insert menu to add the file to the container field, they may choose to insert it as a reference only, which may render the file unreachable to other users.
                    • User's must have access to the base directory file location - set via File > Manage > Containers -  in order to view an externally stored file.

                     

                    Hopefully this is helpful to you. As always, FileMaker provides an abundance of methods to accomplish most any goal. In the end, you should chose a method you are comfortable with so that you can resolve any issues that come up...and they will come up. Have a great evening!

                     

                    God bless,

                     

                     

                    Bill

                    • 7. Re: Inserting PDF Files...
                      keywords

                      BizPraxis wrote:

                      There are a few "gotchas" to be aware of if you choose this method:

                      • If a user drags and drops the file into the container field, FileMaker will automatically embed the file.
                      • If the user uses the Insert menu to add the file to the container field, they may choose to insert it as a reference only, which may render the file unreachable to other users.
                      • User's must have access to the base directory file location - set via File > Manage > Containers - in order to view an externally stored file.

                      Not correct, or at least explanation is needed:

                      1.     Drag and drop into a container field which is properly set to External Storage will automatically store externally; what you say only applies if External Storage is not set.

                      2.     Even with External Storage set, if a user inserts via the menu and chooses the "Store only a reference" option, this will override External Storage. For this reason you ought to consider disallowing user access to this menu for this field—or override it using a script trigger so you control the insertion process.

                      3.     If FMServer is being used, users will be able to view stored files. What you say is only an issue if the FM file is moved/copied to a different machine, in which case the external storage file which FM created will have to go with it.

                      • 8. Re: Inserting PDF Files...
                        BillisSaved

                        Good evening keywords,

                         

                        Thanks for providing the clarification. Although, with regards to my first point, it's my understanding - which could be faulty, in which case I would very much appreciate being corrected - that embedding the file in an container field essentially means Filemaker will decide, based on your configuration, where to store the data. Inserting the file via the Insert menu selection and choosing to insert it as a reference leaves the file wherever it currently is and simply adds a pointer to that location.

                         

                        If that is indeed the case, then dragging and dropping the file into the container field automatically embeds the file, allowing FileMaker to store it as directed by the contain field's configuration, and provides no means to store it only as a reference. Granted that inserting the file by reference or allowing FileMaker to store the data externally have the a similar impact on overall file size, which is to say practically none. If the original file location is not always accessible by the user working in the FileMaker file (e.g., on the developer's laptop), insert by reference could cause problems.

                         

                        I guess that's my way of saying that embedding a file in a container field gives FileMaker control over where the data is stored, regardless of whether or not it's stored externally, whereas inserting a file by reference leaves that control with the user. If I'm mistaken, then I apologize for causing unnecessary confusion. Have a great evening!

                         

                        God bless,

                         

                        Bill

                        • 9. Re: Inserting PDF Files...
                          keywords

                          None of what you say is wrong, nor does it really conflict with what I wrote—it's just another way of expressing basically the same thing. And as we know, with Filemaker, there is always another way of doing anything, so why not also multiple ways of explaining them!

                           

                          The key differences are:

                          1.     Store as a reference stores a reference to the file's location at the time it was stored. No effect on database file size.

                          2.     Embedding stores a copy of the file within the database itself—the original remains in its original location and is no longer relevant to the database. In one respect this is the easiest option if the file has to be moved or copied, as you only need to move the file itself. BUT, the size of the database file increases by the size of the file that is stored, so if there are lots of large files stored things can get out of hand.

                          3.     External storage, whether secure or open, means a copy of the file is stored in a directory which FM itself creates (and, incidentally, destroys when it is no longer needed). If it is an interactive file FM will also create a small image file for display purposes. As for 2, the original remains where it was and is no longer relevant. No effect on database file size.

                          • 10. Re: Inserting PDF Files...
                            alangodfrey

                            "...the size of the database file increases by the size of the file that is stored" - if only that were true.  At least until version 11 the file size would have increased by many many times more than total the embedded file sizes, and the file would quickly have become almost unusable.  I would be interested to hear if that problem has been fixed in Version 15.

                            • 11. Re: Inserting PDF Files...
                              keywords

                              You may be right. A quick test in FM15—embed 3 x 20mb images increased the file size from 2mb to 85mb, which is rather more than the 60mb added.

                               

                              It's a bit like that with Mail too. You send an attachment, but Mail usually regards the size of the email as somewhat larger than the size of the attachment itself.

                              • 12. Re: Inserting PDF Files...
                                alangodfrey

                                I tried it over an extended period, over several versions, because it would be a very convenient feature if it worked, but in the end I gave up trying.  I think it was so bad that even if you added nothing, but opened and closed the file over a period it seemed to grow.

                                Thanks for the confirmation - 'By Reference' (in one form or another) is still the way to go, then.

                                • 13. Re: Inserting PDF Files...
                                  monkeybreadsoftware

                                  Depending on the content, FileMaker may create a preview image and store that, too.

                                  e.g. adding a TIFF creates a JPEG for preview.

                                   

                                  And for mobile other preview sizes may be used internally, too.

                                  • 14. Re: Inserting PDF Files...
                                    keywords

                                    Yes, I mentioned that in point 3.

                                    1 2 Previous Next