2 Replies Latest reply on Feb 21, 2010 5:53 PM by bumper

    Problems with scripted pdf creation and emailing.



      Problems with scripted pdf creation and emailing.


      Filemaker Pro 10.0v3 and FileMaker Pro Advanced 10.0v3.

      iMac's on 10.5 and MacBook Pro on 10.6.

      File is peer hosted from a stand alone mac mini running 10.6


      I have a scripted process that creates a pdf and emails it to MyFax.com. They then send the pdf out as a fax. The script creates the fax cover as the original pdf and then attaches a two page letter to the pdf. The original pdf file looks exactly like the layouts they were created from. The faxed version is changed significantly. Graphics (jpegs) show up as black boxes and the font is changed from a serif to a sans serif font.


      Here's the kicker, if I send the same fax with the "Send Mail" menu step to the same people the fax comes out fine. So it appears that somehow the process by which the pdf is created and or emailed from a script step is different from a menu item. Makes no sense but that's what it looks like.


      Lastly, I have been testing the script with a save to the desktop, which works as above, but if I save with the Get(TemporaryPath) the text blocks and formatting remain but the font turns to gibberish. All fonts are standard OS X issue, Verdana, Times Roman, etc.(I've tried several); and have been checked for corruption.


      Any assistance and advice greatly appreciated.

        • 1. Re: Problems with scripted pdf creation and emailing.



          MacPro 10.6.2


          I've never encountered any difference between saving a pdf from menu commands and doing the same via a script. Be careful to select the correct settings in your script step.


          I can't imagine why you'd save with Get(TemporaryPath) as this saves to an invisible folder (private/var . . . ). Perhaps it's because (I think) it will get deleted when the user logs out and that's what you want. But what if the user doesn't log out (of the OS)? I would save using Get(DesktopPath) and either delete the pdf manually or write an Applescript or Automator action that deletes the pdf.


          Lastly, are you certain the problem isn't at the MyFax end?



          • 2. Re: Problems with scripted pdf creation and emailing.

            You are correct regarding the temp path and deleting the file. It is the intended action.


            Pretty certain it's not MyFax's problem. If I use the Send Mail menu step and manually attach the identical pdf file, the fonts and graphics are not affected as with the script step. However, I had already planned to spend quality time with their support staff tomorrow "just in case"