Loading ...
Sorry, an error occurred while loading the content.

How to use exifTool module for XMP metadata

Expand Messages
  • Srikrishnan
    Hi All, I want to add xmp metadata details in postscript file before distilling to pdf. For this purpose I have written a perl script, something like: my
    Message 1 of 1 , Nov 20, 2008
    • 0 Attachment
      Hi All,

      I want to add xmp metadata details in postscript file before distilling to pdf. For this purpose I have written a perl script, something like:

      my $exifTool = new Image::ExifTool;

      $exifTool->SetNewValue();
      foreach my $singleAu(@CreatVal) {
      ($success, $errStr) = $exifTool->SetNewValue('Creator'=> $singleAu, AddValue => 1);
      #print "Success: $success\n";
      #print "Error $errStr\n";
      }
      $exifTool->Options(Charset => 'Latin');
      $exifTool->SetNewValue('Description',$DescrVal);
      $exifTool->SetNewValue('Format',$FormtVal);
      $exifTool->SetNewValue('Identifier','doi:'.$DoiiiVal);
      $exifTool->SetNewValue('Publisher', $PublsVal);
      $exifTool->SetNewValue('Rights',$RightVal, Charset => 'Latin');
      $exifTool->SetNewValue('Title',$TitleVal);
      $exifTool->SetNewValue('Producer',$ProdcVal);
      print "$DoiiiVal\n";
      $exifTool->SetNewValue('XMP-RDF:About','doi:'.$DoiiiVal, Protected=>'0x01', Protected=>'0x02');
      #$exifTool->SetNewValue('About' => 'doi:'.$DoiiiVal,Group=>'XMP-RDF', Protected=>0x01);
      $exifTool->SetNewValue('Copyright' => $CpyrtVal, Charset => 'Latin');
      $exifTool->SetNewValue('DOI',$DoiiiVal);
      $exifTool->SetNewValue('EIssn',$EissnVal);
      $exifTool->SetNewValue('EndingPage',$EndPgVal);
      $exifTool->SetNewValue('ISSN',$IssnoVal);
      $exifTool->SetNewValue('Number',$NumbrVal);
      $exifTool->SetNewValue('PublicationDate',$PubDtVal);
      $exifTool->SetNewValue('PublicationName',$PubNmVal);
      $exifTool->SetNewValue('RightsAgent',$RgtAgVal);
      $exifTool->SetNewValue('StartingPage',$SrtPgVal);
      $exifTool->SetNewValue('URL',$UrlllVal);
      $exifTool->SetNewValue('Volume',$VolumVal);
      $exifTool->SetNewGroups('XMP','EXIF','IPTC');
      $exifTool->SetNewValue('CreateDate' => $CrtDtVal, Group => 'XMP');
      $exifTool->SetNewValue('CreatorTool' => $CrtTlVal, Group => 'XMP');
      $exifTool->SetNewValue('Identifier'=> 'Doi:'.$DoiiiVal, Group => 'XMP');
      $exifTool->SetNewValue('Label'=> $LabelVal, Group => 'XMP');
      $exifTool->SetNewValue('MetadataDate' => $MDdatVal, Group => 'XMP');
      $exifTool->SetNewValue('ModifyDate' => $MfyDtVal, Group => 'XMP');
      $exifTool->SetNewValue('DocumentID' => $DocIDVal);
      $exifTool->SetNewValue('InstanceID' => $InsIDVal);
      $exifTool->SetNewValue('Marked',$MarkdVal);
      $exifTool->WriteInfo($FileName, $mdfyName);


      But my problem is, I am not able to write "DOI" number in 'XMP-RDF:About' tag. in the ps file the value for "rdf:about" appears as empty.



      FYR:



      Below is the code I got in PS file:



      <rdf:Description rdf:about=''

      xmlns:pdf='http://ns.adobe.com/pdf/1.3/'>

      <pdf:Producer>Acrobat Distiller 6.0.1 (Windows)</pdf:Producer>

      </rdf:Description>



      But the value I assigned for the scalar variable is ..$DoiiiVal="10.1000/XXX00000"

      Can anyone helpme in this regard?

      Regards,
      Srikrishnan


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.