PDF to Temp Folder on Mac OSX FM10

Andrew Markham's Avatar

Andrew Markham

13 May, 2010 09:10 PM

I am having problems achieving a print to PDF for attachment in Send Mail script step using a temp folder.

When I use filemakers Get(TemporaryPath) to create the PDF with PrintSwitch nothing occurs suggesting invalid path/privileges. It seems to be privileges as the FM export records script step works fine to the same path.

However if I use the absolute path /tmp/ or /var/tmp/ as suggested then the PDF is created but the Send Mail script step in FM can pick up the attachment. Once again to to privileges I guess.

Any suggestions here?

  1. Support Staff 1 Posted by Support on 17 May, 2010 06:48 PM

    Support's Avatar

    Hi,

    The problem is that if you use Get(TemporaryPath), FileMaker adds the volume name to the path, whereas PrinterSwitch requires a standard Unix path, e.g.

    if your volume is named 'MacHD' then Get(TemporaryPath) will resolve into something like:
    "/MacHD/private/var/folders/9K/9KBa83dA2RWqhU+kNTZKi++++TI/-Tmp-/S10/"

    however, the correct Unix path in that case would be
    "/private/var/folders/9K/9KBa83dA2RWqhU+kNTZKi++++TI/-Tmp-/S10/"

    In your calculation you could remove the string before the second slash to solve the problem.

    Let me know if this helps,

  2. Support closed this discussion on 17 May, 2010 06:48 PM.

  3. andrew Markham re-opened this discussion on 18 May, 2010 01:24 AM

  4. 2 Posted by andrew Markham on 18 May, 2010 01:24 AM

    andrew Markham's Avatar

    Thanks luk,

    This hit the nail on the head. Works a treat thanks.

  5. Support closed this discussion on 18 May, 2010 05:06 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac