7 Replies Latest reply on Mar 24, 2014 2:33 PM by Stephen Huston

    pdf in gmail problem


      Ok so I have code in my database that saves a layout as a pdf then attaches it to an email to send to parents.


      However, the attachment does not show up for all recipients. I know it is attached and it will always open fine on mya ipad or mac using the mail program. It will also open fine if I use Safari to access gmail. But if I use chrome I just get a broken link where the attachment should be.

      Firefox shows the attachment symbol in gmail but wont actually let me click it.

      Parents are getting irate as I send updates of their child's progress but only some parents are able to open the attachment!

      There seems no rhyme or reason.

      What am I doing wrong?

        • 1. Re: pdf in gmail problem

          You're not doing anything wrong, just showing that different mail programs have different levels of support for how emails with attachments from filemaker are formatted. There might also be an issue with how your PDF is encoded, make sure you set the support level for it far back in the options.


          My suggestion? If email is that much of a primary function of your database, you should switch to using a more reliable email plugin. There are many out there that are fairly easy to integrate, and have other features, like reading emails back into filemaker (IE processing bouncebacks and replies), not to mention multiple attachments and HTML email formatting.


          Weetbicks just posted an awesome email as well on how to send mail using Mandrill.



          The issues are seemingly client-side, that's why it works for some and not others. There's millions of possible combinations of OS / browser version / mail client and it would be hard for a (not specific email oriented database like filemaker) to support it all. By using a "partner" plugin or web service to send your mail, it will most likely be sent in a more universally supported format.

          • 2. Re: pdf in gmail problem

            Thanks for that, I haven't looked at plugins before so I will start to investigate that as the email is an important component.


            Had a reply from one parent that said forwarding the email to herself had solved the problem for her.


            Thanks again.

            • 3. Re: pdf in gmail problem

              Some mail clients and some browsers do not natively include PDF support.  FireFox does not.  Safari does.  So that makes sense why you would see a preview in Safari and not FireFox.  Apple Mail supports PDF preview and that is why it works there.  Free programs often do not pay Adobe for the license and do not get PDF preview.  But they should have the ability to download and open the PDF in Acrobat.  This is not a FileMaker problem that FileMaker can fix.  It is a the software of choice that the recipient is using to read it. 


              Most, but not all, email readers include JPG support.  You could use a program like MBS to convert the PDF to JPG and attach it with the message.  Or you could use a plugin like Mike suggested that support HTML email and format things nicely if you know HTML or have a web develoepr that can help. 

              • 4. Re: pdf in gmail problem

                Cheers, that explains a lot!


                Will look at plugins and see if I can learn how to use them.

                • 5. Re: pdf in gmail problem
                  Stephen Huston

                  Also make sure that your PDF file options are set to save the file(s) with the correct ".pdf" extension. Some systems won't recognize the file without that, nor accept an unknown file type as an attachment.

                  • 6. Re: pdf in gmail problem

                    I have this in my code


                    Get ( TemporaryPath ) & “report.pdf"


                    is that what you mean? Or is there another option within FM that I need to set?

                    • 7. Re: pdf in gmail problem
                      Stephen Huston

                      No, the ".pdf" is the key. I had a client try to send me two pdfs recently with multiple "." periods in each file name, and they failed to email from one of their systems. When I finally got them, they were fine on my Mac, though I fixed the file names just to be safe.


                      Yours sounds like a separate problem, which can vary a lot with email systems, particulary browser-based email. When using browser access, the support for PDF's varies a lot. Some show the PDF right in the browser window, some open it in Acrobat Reader (but only if the Reader and Acrobat plugins are installed on the system), and some of the oldest ones out there don't have a clue what to do with it if the local machine's browser is not configured specifically in its preferences for PDFs.


                      The only thing I can recommend is that you should assume many home computers are using really old browsers and versions of Acrobat Reader downloaded the previous decade (or century). Be sure your FM Script step for saving as PDF is set to use the OLDEST version  compatibility (settings button in the options are for saving as PDF)  so that as many versions of Reader as possible can recognize the file. I found that the default is often not the oldest possible version.