Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6297 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've been working on this problem over a period of time, and these are the 2 best solutions I've come up with for embedding PDFs entirely in 7 container fields. Both of them use one field for the file itself, and a separate field for the 1st page of the file. Only the 1st page of a PDF is visible in FileMaker 7 (AFAIK).

The 1st method just Inserts the PDF into the field. This is OK, but doesn't look so good. It is not anti-aliased, as PDFs usually are everywhere else. It prints fine; but it's only the 1st page.

The 2nd method uses an external helper, a free AppleScript Scripting Addition, GraphicsImporter; which you must get, in the Scripting Additions section at http://www.macscripter.net. Or:

http://osaxen.com/graphicsimporter.html

It basically converts the PDF to a Jpeg and Inserts that as a picture. It's a little more readable.

Either method can handle either PDFs or Jpegs (it doesn't Insert File with a Jpeg, no point to that). The 2nd method can handle other graphic formats also, but it converts them to Jpegs. The 1st method could also handle other types, but you'd have to extend the routines for each; I only did PDF and Jpeg.

Try both methods on your PDFs and see which one is best for you. Both methods store and can export the entire file, so it's not critical that the picture in FileMaker is perfect (though it would be nice).

Both methods should work on any OS X Mac (though you need GraphicsImporter for the 2nd). The scripts are as simple as they can be, for other developers to incorporate in their own files. There is little error checking. They should work in network situations, because they use the Users/Shared folder for exporting. If you've changed your hard drive name, change it back :-/

You could alternatively use the "path to temporary items", and not move the file to the Desktop. This would effectively cause it to be deleted automatically later.

There are 2 files for each method, a "parent" and the image file. Because you might want the images connected to a parent table, and you might want the images in their own folder. But this can be easily changed.

If anyone feels the urge, my paypal account and email are fenton at fentonjones.com :-]

ImagesPDFs7.zip

  • 2 years later...
Posted

Could you tell us why sips/imageevents is a less convenient choise here??

http://www.apple.com/applescript/imageevents/

What does the osaxen provide, lacking in imageevents???

--sd

×
×
  • Create New...

Important Information

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