Page 1 of 1

IPTC in Adobe Illustrator files

Posted: Fri Jan 14, 2011 8:33 pm
by handell
I know you can injct IPTC data into Adobe Illustrator vector files using applecript. But how can I read/write it with PHP?

iptc keywords

Posted: Fri Jan 14, 2011 11:55 pm
by handell
I have a bunch of adobe illustrator files & pdfs that contain metadata iptc keywords .
I cannot seem to get this data to extract using php exif_read_data.

ive tried many options including this one:

Code: Select all

 ///////read meta keyword
 function output_iptc_data($image_path ) {   
   $thiz = "";
   $size = getimagesize ( $image_path, $info);       
     if(is_array($info)) {   
        $iptc = iptcparse($info["APP13"]);
        foreach (array_keys($iptc) as $s) ; {             
            $c = count ($iptc[$s]);
            for ($i=0; $i <$c; $i++)
            {
 $thiz .= $iptc[$s][$i].',';
}}}
return $thiz;
}
 ////remove ext
function RemoveExtension($filename) {
  $file = substr($filename, 0,strrpos($filename,'.'));   
 return $file;
    }
    
    
but have been unsuccessful.
most of these have been injected using adobe bridge.

Reason: need to convert to thumbs but want to retain the keywords

any help would be appreciated

Re: IPTC in Adobe Illustrator files

Posted: Sat Jan 15, 2011 4:17 am
by josh
fopen() fread() and fseek()

Re: iptc keywords

Posted: Sat Jan 15, 2011 4:52 am
by Weirdan
:arrow: Merged topics as they seem to be closely related.

Re: iptc keywords

Posted: Sat Jan 15, 2011 3:55 pm
by josh
Adobe illustrator files typically end in .ai
exif_read_data operates on a jpeg or tiff.