Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Print PDF Stored in Container Field Part 2

Featured Replies

In my initial message I described what I wanted to do, batch print multiple records with container fields containing multi-page PDF files. I found an App that works for this called "Skim" which is capable, via AppleScript of prompt-less printing of PDF files. I use filemaker's "Export Field Contents" to put the files in a known location, than using a calculated applescript I feed the PDF paths to Skim. The only problem is Skim won't open them. It displays an error message saying the file couldn't be found. Weird thing is it displays the exact and correct file path so what is it I'm doing wrong?

Calculated AppleScript follows:

"set filepath to ""  & $tempfilepath[$count] & """ &



"¶tell application “Skim”¶

activate¶

        open filepath¶

        print document 1 without print dialog¶

        close document 1¶

 end tell¶"

weirderror.png

That's not a regular AppleScript Mac file path. And it's just text. AppleScript expects either an "alias", a "file", or a "folder". This would work:

open file "Macintosh HD:Applications:FileMaker Pro Advanced:002Army_HealthAndWellness.pdf"




Personally I wouldn't be putting a bunch of documents inside the FileMaker Pro application folder. There's several other places you could put them. FileMaker knows a couple of them:



Get ( DesktopPath )

Get ( DocumentsPath )



AppleScript knows these, and a bunch more:



path to desktop

path to documents folder

path to application support from user domain

path to temporary items



The above produce an alias, not text. So if you wanted to add something to the path (which you would), you'd need to coerce to text, add it, then coerce back to a file or folder. Yeah, Unix text paths are simpler to use in some ways. You'd have to do something like this (which only works if the file is there, otherwise it's an error):




set doc_txt to path to desktop as text

set file_path to alias (doc_txt & "002Army_HealthAndWellness.pdf")

Notice that most of these by default refer to the user domain (within user's home folder). But there is also a "Application Support" folder in the top Library folder, which is the default path.

[FileMaker 9 has a Get (TemporaryPath), but it's not the same place, nor does it behave the same.]

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.