iptc keywords

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
handell
Forum Newbie
Posts: 7
Joined: Sat Feb 14, 2009 9:18 pm

IPTC in Adobe Illustrator files

Post 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?
handell
Forum Newbie
Posts: 7
Joined: Sat Feb 14, 2009 9:18 pm

iptc keywords

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: IPTC in Adobe Illustrator files

Post by josh »

fopen() fread() and fseek()
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: iptc keywords

Post by Weirdan »

:arrow: Merged topics as they seem to be closely related.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: iptc keywords

Post by josh »

Adobe illustrator files typically end in .ai
exif_read_data operates on a jpeg or tiff.
Post Reply