9 Replies Latest reply on Oct 9, 2009 9:01 AM by casey777

    Adding pictures to Database and Emailing PDFs

    AAgraphics

      Title

      Adding pictures to Database and Emailing PDFs

      Post

      First, we have a Filemaker Database that is hosted on an external server.  We use the internet to access the FileMaker database.  Currently there are no pictures or images in the database.  We are thinking about adding images to the database, but we are worried that it may make the database too large.  Is this a valid concern?  If the database grows in size will it take a long time to open and / or use?  What size is too big?  What would be the preferred image format to use?

      Also, would it be okay to add PDFs to the FileMaker database or would that be a no no? 

       

       

      Second, I have another question:

       

      1) Using FileMaker 10

      2) Mac OS 10.6 and Windows

      3) The database is used by multiple people in FileMaker over the internet on both PCs and Macs.

       

      4) Here's is what I am trying to do:

       

      We have a page on the database where multiple email addresses are entered.  After the email addresses are entered, we are trying to make it so you can click on a button and FileMaker will automatically create a PDF of that page (the current record that is being browsed in a specific layout) and email the PDF as an attachment through FileMaker to all of the recipients listed in the first sentence of this paragraph.  People using Macs and PCs will be using this feature.  In addition, they are accessing the FileMaker database over the internet and they are using FileMaker.

        • 1. Re: Adding pictures to Database and Emailing PDFs
          casey777
             I am wondering why you need to put the email addresses in a PDF rather than simply list them in the body of the email. When sending a PDF as an attachment those with PCs need to take an additional step to open the PDF. If you are using a PDF to include a photo on a letterhead or other form, I understand. If it is just to supply information to others, concatenate everything into the body of the email.
          • 2. Re: Adding pictures to Database and Emailing PDFs
            AAgraphics
              

            TECman,

            Thank you for the response.  In FileMaker, the goal is to have the user enter the email address of the intended recipient in the field and then have that data on the layout turned into a PDF and emailed as an attached PDF to the intended recipient.  We could have the text in the body of the email, but the presentation of the data is superior as a PDF.  I just do not know how to have FileMaker create the PDF and automatically attach it as an email and send, all through FileMaker.  I can get FileMaker to do everything, except take the PDF and attach it to the email.  Help!

            • 3. Re: Adding pictures to Database and Emailing PDFs
              ChadAdams
                

              You're going to have to have a specified place for people to save the PDF.  The script will go something like this:

               

              Set Variable [$path; Value:"the  path where people will save it"]

              Save Records as PDF - save to $path

              Send Mail step - to the people in your list use $path as the attach.

               

              Depending on how you have things set up you might have a single send mail step with all the email address's listed together or you might choose to loop through them sending one at a time.

               

              This is going to rely on the end users having their systems configured in a similar manner.  So if these people are a part of your company and you can dictate how they have it setup then it might work.  But if you've specified the PDF to be saved the Macintosh HD directory and Frank renames his HD to be Mac HD, then your path is brok and it won't work.

               

              Without knowing the relationship between you and the users it is hard to offer much more.  You could use a plugin to prompt the user for a place to save the file and then capture that path, but if you can't ensure all your users will have that plugin it won't work.  

               

              Because of all the different possible setups that are probably out of your control it might be better/easier to do some training and not have a 100% automated solution, but rather teach the user how to save the PDF and then how to send it via email.

               

              --

              Chad Adams

              chad.adams@skeletonkey.com

              • 4. Re: Adding pictures to Database and Emailing PDFs
                casey777
                   After you have the information you want for the PDF, do a Save as PDF which will save it to your desktop or wherever you specify. I would be doing this using a script, and in the script line for Send Mail, you can specify one attachment which will be included in the email. If you use a Plug-in like SMTPit Pro, you can send that layout inline instead of as an attachment, although the scripting gets a bit more complex. 
                • 5. Re: Adding pictures to Database and Emailing PDFs
                  AAgraphics
                    

                  Chadams, 

                  Thank you very much.  When it saves the PDF, is there a way to have FileMaker save the PDF as a temporary file so after the email is sent (or some time afterwards) the PDF is then automatically deleted?

                  • 6. Re: Adding pictures to Database and Emailing PDFs
                    ChadAdams
                      

                    Not exactly as you describe it.

                     

                    You could get pretty close to that functionality by using the Get ( TemporaryPath ) function as the path where you're going to save the PDF.  This is a temporary directory that gets deleted when FileMaker is quit.  Look in FileMaker's help for more info.

                     

                    --

                    Chad Adams

                    chad.adams@skeletonkey.com

                    • 7. Re: Adding pictures to Database and Emailing PDFs
                      AAgraphics
                        

                      Chadams,

                       

                      Thanks for the info!  How do I create a script to save the PDF in the Get(TemporaryPath) ? 

                      • 8. Re: Adding pictures to Database and Emailing PDFs
                        ChadAdams
                          

                        Open Script Maker

                        Create a new script

                         

                        It should look something like this:

                         

                        Set Variable [ $path; "filewin:" & Get ( TemporaryPath )] - use "filemac:" instead of "filewin:" if on a mac
                        Save Records as PDF [No dialog; $path]

                        Send Mail - With this highlighted choose the specify button and use that dialog to enter the info for the email.   Click the arrows next to the To, CC, BCC, Subject and Message fields to gain access to the calculation engine window where you can more easily pick your fields.  Click the attach button and enter $path so that it will get the data from your variable.

                         

                        --

                        Chad Adams

                        chad.adams@skeletonkey.com

                        • 9. Re: Adding pictures to Database and Emailing PDFs
                          casey777
                             There is another way to do it IF you are saving the PDF, sending it, and have no use for it after that. Simply create a PDF file on each computer desktop or wherever named "whatever.pdf" and then every time someone saves the PDF on any computer, it would rewrite it into that file on their computer. Then the attachment name for the Send Mail checkbox would always be the same. That individual file would remain and be used over and over.