AnsweredAssumed Answered

Send Email Attaches pdf but it is garbage, manually attach file it is fine.

Question asked by JaneReeder on Sep 29, 2011
Latest reply on Oct 16, 2013 by dgbrown57

Summary

Send Email Attaches pdf but it is garbage, manually attach file it is fine.

Product

FileMaker Pro

Version

Advanced 11.0v4

Operating system version

10.7.1

Description of the issue

When I use a script to attach a pdf to an email [Send Mail command] the attached file is garbage. If I delete the attachment and manually add the same pdf when I open it in the email it looks normal. Tested with various documents - keynote files and older pdfs look fine.

Steps to reproduce the problem

Using OS X Mail for email application

Here is the script I'm using: PieChartPDF Go to Layout [ “Overall Status Pie Chart” (ActionItem) ] Set Variable [ $$harddrive; Value:Get ( FileMakerPath ) ] Set Variable [ $$appversion; Value:Case(Length(LeftWords(Get(ApplicationVersion);1))=3; "FileMaker "; "FileMaker Pro Advanced") & ""& Left(RightWords(Get(ApplicationVersion);1); Position ( RightWords(Get(ApplicationVersion);1) ; "." ; 1 ; 1 )-1) ] Set Variable [ $$file; Value:"Action Item Overall Status " & Left(MonthName(Get(CurrentDate));3) & " " & Day(Get(CurrentDate)) & " " & Right(Year(Get(CurrentDate));2) ] Save Records as PDF [ File Name: “$$file”; Records being browsed ] [ Document - Title: "Action Item Overall Status"; Compatibility: Acrobat 7 and later ] [ Pages - Number Pages From: 1; Include: Specific Pages; Start Page: 1; End Page: 1 ] [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Page Only; Page Layout: Single Page; Magnification: 100% ] [ Restore; No dialog ] Go to Layout [ “ActionItemSummaryReport” (ActionItem) ] Save Records as PDF [ File Name: “$$file”; Records being browsed ] [ Document - Title: "Action Item Overall Status"; Compatibility: Acrobat 7 and later ] [ Pages - Number Pages From: 1; Include: Specific Pages; Start Page: 1; End Page: 1 ] [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Page Only; Page Layout: Single Page; Magnification: 100% ] [ Restore; Append; No dialog ] Send Mail [ Send via E-mail Client; Subject: "Action Items Weekly Report " & Get(CurrentDate); Message: "All,¶¶ Enclosed you will find the overall action item status. ¶"; Attachment: “file:$$file” OR “filewin:/c:/Program Files/FileMaker/$$appversion/$$file” OR “filemac:$$harddrive/$$file” OR “filewin:$$harddrive/$$file” ] Expected result:

Expected result

When I double click on the attached pdf it should show me the pdf which in this case is a pie chart and then an appended text list.

[I have tried with and without the pie chart and with the chart after the text page].

Actual result

file opens and it is garbage

Exact text of any error message(s) that appear

%PDF-1.6 %‚„œ” 1 0 obj <</PageMode/UseNone/Metadata 4 0 R/Pages 2 0 R/PageLayout/SinglePage/OpenAction[6 0 R/XYZ null null 1.0]/Type/Catalog>> endobj 4 0 obj <</Subtype/XML/Length 3284/Type/Metadata>>stream <?xpacket begin="Ôªø" id="W5M0MpCehiHzreSzNTczkc9d"?> 2011-09-29T11:52:03-07:00 2011-09-29T11:52:03-07:00 2011-09-29T11:52:03-07:00 uuid:82fd6610-d36a-be40-a2df-53ba506c6281 uuid:1c3c8d4e-aa7c-7a43-9e6f-7d388e6cd43c application/pdf Adobe PDF Library 8.0

Workaround

Delete the attached file and manually add it to the email. I'm attaching a copy of the pdf.

Outcomes