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.

Importing metadata from PDFs

Featured Replies

  • Newbies

Sorry for my ignorance and (somewhat) obvious inexperience when it concerns working with Filemaker, but is it possible to automatically extract the metadata info (author, creator, title, etc) from hundreds of pdf files into filemaker fields?

There is also AppleScript, which you can run via the Perform AppleScript step, to run the shell command mdls. This is like Spotlight uses (I think). It is fairly simple to get ALL the metadata, but it's a big text block. You can also specify which piece you want, by using the -name option.

Unfortunately the only example file I have is for movie files, which have a lot of different stuff. There are more metadata tags available in Leopard I believe, but like you I'm still on Tiger. So here are basic AppleScript examples, which you could run in the Script Editor app, to see what you can get.


-- This is the general metadata you can get from a file. Remove --comments to run do shell script lines



set file_alias to choose file with prompt "Get the metadata of a file:" without invisibles

set unix_file to quoted form of POSIX path of file_alias



do shell script "/usr/bin/mdls " & unix_file

-- all metadata for chosen file



-- you can also get a named element

-- do shell script "/usr/bin/mdls -name kMDItemContentType " & unix_file



-- but you need to cut it out

-- do shell script "/usr/bin/mdls -name kMDItemContentType " & unix_file & " | tail -1 | cut -d = -f 2 | cut -c 2-"



-- do shell script "/usr/bin/mdls -name kMDItemWhereFroms " & unix_file & " | tail -n +2 | cut -d = -f 2 | cut -c 2-"

-- download URLs, can be several several lines 

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.