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 PDF file

Featured Replies

  • Newbies

Wondering if this is possible.. PDF in a container, I want to autofill filemaker data fields from PDF metadata... possible?

This has been asked a few times before, but I don't recall anyone coming up with a solution.

Perhaps PDF metadata is accessible via AppleScript?

-Stanley

Yes, it is accessible via AppleScript. Not that I know much about what it is :-]

To see the tags available:

set theFile to (choose file)

tell application "Image Events"

set theImage to open theFile

set theMeta to metadata tags of theImage

close theFile

return theMeta

end tell

To return a value, such as the height:

set theFile to (choose file)

tell application "Image Events"

set theImage to open theFile

set theHeight to value of metadata tag "pixelHeight" of theImage

close theFile

return theHeight

end tell

Some of the values can be gotten directly by ImageEvents:

set theFile to (choose file)

tell application "Image Events"

set theImage to open theFile

set theSpace to color space of theImage

close theFile

return theSpace as string

end tell

From ImageEvent's dictionary:

color space Eight channel/Eight color/Five channel/Five color/Seven channel/RGB/Lab/XYZ/Six channel/CMYK/Six color/Seven color/Named/Gray [r/o] -- color space of the image's color representation

resolution list [r/o] -- the pixel density of the image, in dots per inch, as a pair of integers

bit depth sixteen colors/color/four grays/black & white/thousands of colors/grayscale/two hundred fifty six grays/four colors/sixteen grays/millions of colors/best/two hundred fifty six colors/millions of colors plus [r/o] -- bit depth of the image's color representation

name Unicode text [r/o] -- the name of the image

dimensions list [r/o] -- the width and height of the image, respectively, in pixels, as a pair of integers

image file file [r/o] -- the file that contains the image

file type PICT/Photoshop/BMP/QuickTime Image/GIF/JPEG/MacPaint/JPEG2/SGI/PSD/TGA/Text/PDF/PNG/TIFF [r/o] -- file type of the image's file

Hmmm ... I'd think "PDF metadata" meant details such as creator, title, keywords, etc. that are embedded in a PDF file?

Fenton was on the right track. Image Events' Image Suite has a metadata tag class - the question is figuring out the name of the metadata tags in a PDF. The AppleScript dictionary shows the following for it:

Class metadata tag: A metadata tag: EXIF, IPDC, etc.

Plural form:

metadata tags

Properties:

<Inheritance> item [r/o] -- All of the properties of the superclass.

name Unicode text [r/o] -- the name of the tag

description Unicode text [r/o] -- the description of the tag's function

value item [r/o] -- the current setting of the tag

-Stanley

Comment is undoubtedly correct, that the metadata they're talking about it is something else. I imagine if it's an Adobe Acrobat file with that kind of metadata then you could get it with Acrobat, if it's available. But I don't know.

Unfortuately, the Acrobat Reader application is not scriptable. Perhaps the deluxe (or whatever it's called version is scriptable.)

-Stanley

  • 9 months later...
  • Newbies

Did you ever find a solution to obtaining PDF metadata directly from the file? I am working on a similar project (I believe), would like to extract the PDF Metadata (Author, create date, modified date, Page Count, File Size) and use this information to manage and manipulate the PDF(s) in a DocManagement system.

Before all of the suggestions....TROI and DACONS will NOT perform the desired routine as detailed above.

Had worked with some COMs from "veryPDF" however they are a bit pricey and buggy and are, apparently, not scriptable in FM8.

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.