acrobat - Filemaker or applescript calculation to identify and add proper file extensions when exporting containers -


i have variety of mixed media stored in container fields trying export , open (primarily adobe acrobat) running problem when exporting these documents because many either not have file extensions or when rename them upon export , add extension .pdf incompatible actual file type creating error message acrobat when trying open... there function, plugin or calculation can use on export identify file type , add extension on end of file name?

to set name extension of images not have file extension:

you can use unix command "file" type of image (work on pdf's document).

here example:

set myfolder (path desktop folder text) & "print:" set myfiles list folder myfolder without invisibles repeat f in myfiles     set tfile myfolder & f     set na_ext name extension of (info file tfile)      if na_ext missing value -- no name extension         set r shell script "/usr/bin/file " & quoted form of posix path of tfile -- type of image         if "pdf document" in r             set na_ext ".pdf"         else if "png image data" in r             set na_ext "png"         else if "tiff image data" in r             set na_ext "tiff"         else if "jpeg image data" in r             set na_ext "jpg"         else if "jpeg 2000 image data" in r             set na_ext "jp2"         else if "adobe photoshop image" in r             set na_ext "psd"         else if "pc bitmap" in r             set na_ext "bmp"         else if "gif image data" in r             set na_ext "gif"         else if "sgi image data" in r             set na_ext "sgi"         else if "targa image data" in r             set na_ext "tga"         end if          if na_ext not missing value             tell application "finder" set name extension of file tfile na_ext -- set name extension of file         end if -- else type of image not in script     end if end repeat 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -