May 23, 200520 yr Newbies Wondering if this is possible.. PDF in a container, I want to autofill filemaker data fields from PDF metadata... possible?
May 24, 200520 yr This has been asked a few times before, but I don't recall anyone coming up with a solution.
May 24, 200520 yr 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
May 24, 200520 yr Hmmm ... I'd think "PDF metadata" meant details such as creator, title, keywords, etc. that are embedded in a PDF file?
May 24, 200520 yr 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
May 24, 200520 yr 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.
May 31, 200520 yr Unfortuately, the Acrobat Reader application is not scriptable. Perhaps the deluxe (or whatever it's called version is scriptable.) -Stanley
March 4, 200619 yr 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