XMP metadata in active indd document

Is there any possibility to add XMP metadata in the active InDesign document using scripting?
Thanks
SS

Hi Sankar,
You can use the Scripting guide example below here.
var myDocument = app.activeDocument;
with (myDocument.metadataPreferences){
author = "Adobe";
copyrightInfoURL = "http://www.adobe.com";
copyrightNotice = "This document is copyrighted.";
copyrightStatus = CopyrightStatus.yes;
description = "Example of xmp metadata scripting in InDesign CS";
documentTitle = "XMP Example";
jobName = "XMP_Example_2003";
keywords = ["animal", "mineral", "vegetable"];
//The metadata preferences object also includes the read-only
//creator, format, creationDate, modificationDate, and serverURL
//properties that are automatically entered and maintained by InDesign.
//Create a custom XMP container, "email"
var myNewContainer = createContainerItem("http://ns.adobe.com/xap/1.0/", "email");
setProperty("http://ns.adobe.com/xap/1.0/", "email/*[1]", "[email protected]");
thx
csm_phil

Similar Messages

  • How to read XMP metadata of an indd file using Actionscript

    Hi All,
    I am trying to read XMP metadata of an indd file using CS Extension Builder in Flash Builder 4.5.
    The documentation has many class like XMPmeta, XMPStruct, etc.
    I have got the currently opened document in InDesign as follows:
    var myDoc:Document = InDesign.app.activeDocument();
    And a new XMPmeta object is created as follows:
    var myXMP:XMPMeta = new XMPMeta();
    How to initialize document's xmp metadata in the XMPMeta object? Or is there any other way to get the XMP metadata of currently opened document in InDesign?

    I have found that the XMP data of an InDesign document can be retrieved in actionscript as follows:
    InDesign.app.activeDocument.metadataPreferences
    This returns the MetadataPreference object.
    But I am not able to iterate each namespace in the xmp. There isn't any XMPFile class which allows me to serialize the object to xml file so that I can iterate all elements in the XMP.
    I could not relate class like XMPMeta, XMPProp, etc. with the MetaDataPreference class. So, how to obtain the entire xmp packet from the MetadataPreference object?
    Can anyone shed light on this?

  • Adding XMP metadata into new illustrator document

    var app:Application = Illustrator.app;
    var doc:Document = app.activeDocument;
    var xmpString:String = doc.XMPString;
    var xmpMeta : XMPMeta = new XMPMeta(xmpString);                       
    var myNamespace : Namespace = new Namespace("test", "http://test.thisiscool");
    xmpMeta.myNamespace::stringName = "supercool";
    var tmp : String = xmpMeta.serialize();
    doc.XMPString = tmp;
    If I execute the above code block I end up with the following metadata inside the document:
    <rdf:Description rdf:about=""
                xmlns:ns1="http://test.thisiscool">
             <ns1:stringName>supercool</ns1:stringName>
          </rdf:Description>
    Why is the prefix defaulted to ns1 when I specified that it should be "test"?
    The documentation says you can register your own custom prefixes. But it doesn't say weather it's possible to do that programatically.  Is it?  If not, how is it done?:
    Prefixes are not stored in the data model, but only in namespace URIs. The parser collects the namespace prefixes, to be used when the same XMPMeta object is serialized after modification. For the Adobe standard namespaces, defined in the XMP Specification: Part 2, Standard Schemas, the default namespaces are stored in a global namespace registry of the library. You can also register custom prefixes for your own namespaces; if the serializer does not find a registered prefix for a certain namespace, it generates prefixes of the form "ns1", "ns2" and so on.

    The CS SDK forum is actually probably more correct, but this is probably an Illustrator scripting question.
    You might be able to add the namespace using the XMP Namespace Designer, but I'm not sure...
    Harbs

  • Incrementally appending  custom XMP metadata into PDF files

    I have a problem writing custom XMP metadata into a PDF document (I'm using the XMP Toolkit SDK).
    The problem is that I don't know whether is possible to expand the XMP packet in order to append metadata incrementally into the document, and, if it is possible, I don't know how to do it. The program I wrote succesfully appends an item to an array four times, but it fails when trying to append the fifth one. The reason obviously is that the packet gets full and there is not room for more metadata. The error message, if I force the PutXMP call, is:
    ERROR: Can't fit into specified packet size
    So, what can I do? How to enlarge the packet or make it expandable? Or, otherwise, have I to inject a new XMP packet with the up-to-date information in it? How?
    And a last question: Have I to scan for packets when dealing with PDF files? No smart handlers are available for this kind of files?
    Thanks in advance.
    Xabier Artola.
    Univ. of the Basque Country.

    Were you able to find a solution to this problem? I am having the same issue.
    Jason

  • Incrementally appending custom XMP metadata

    I have a problem writing custom XMP metadata into a PDF document (I'm using the XMP Toolkit SDK).
    The problem is that I don't know whether is possible to expand the XMP packet in order to append metadata incrementally into the document, and, if it is possible, I don't know how to do it. The program I wrote succesfully appends an item to an array four times, but it fails when trying to append the fifth one. The reason obviously is that the packet gets full and there is not room for more metadata. The error message, if I force the PutXMP call, is:
    ERROR: Can't fit into specified packet size
    So, what can I do? How to enlarge the packet or make it expandable? Or, otherwise, have I to inject a new XMP packet with the up-to-date information in it? How?
    And a last question: Have I to scan for packets when dealing with PDF files? No smart handlers are available for this kind of files?
    Thanks in advance.
    Xabier Artola.
    Univ. of the Basque Country.

    One of the known limitations of the XMPToolkit is that it is NOT smart about PDF documents - it treats them as "generic binary" and thus can not add beyond the pre-allocated whitespace already in the PDF.
    If you are doing any serious operations of XMP with PDF - I recommend that you look at licensing the Adobe PDFLibrary which is a full functioning PDF library and incorporates the XMPToolkit inside it (among many other things).

  • Looking for XMP schema relevant to scanned documents

    I want to embed XMP metadata in a scanned document, I'm looking for any existing schema or standards or even existing practice by anybody.
    Examples:
    physical sheet number
    side of page (front or back)
    make & model of scanner
    operator name
    scan resolution (DPI)
    paper size
    pixel format
    paper orientation
    Doesn't have to be those exact things, anything relevant would be interesting.

    Thanks for that link. Have to read it.
    I tracked the current problem down to the fact, that Adobe Lightroom puts the usageTerms into an element, looking like
    <xapRights:UsageTerms>
    <rdf:Alt>
    <rdf:li xml:lang="x-default">
    ...some text...</rdf:li>
    </rdf:Alt>
    </xapRights:UsageTerms>
    while bibble Pro 5 puts it into an attribute like
    <rdf:Description ... xmpRights:UsageTerms="..." ...>
    Based on the descriptions about XMP I found so far it is impossible to tell which of both is correct (and where the element or attribute is allowed). Hope to find some answers in that document.

  • Modifying XMP metadata does not modify the document

    Another from couple questions which accumulated over time.
    If I modify layer in document by adding or updating XMP metadata, the document itself is not modified (does not enable save), so far if document is closed without doing some other action which marks document as modified, data are lost.
    Question: how to either force document to see changes in XMP meta or how to mark document as modified?
    Code snippet:
         activeDocument.activeLayer.xmpMetadata.rawData = meta.serialize();
    Thanks,
    --Petr

    When you ask app-specific questions, you should really specify the app you are referring to.
    I'm guessing you are talking about Photoshop. This seems to be a scripting related question, and you'll probably get better answers on the Photoshop forum: http://forums.adobe.com/community/photoshop/photoshop_scripting
    Harbs

  • PdfA1b -  Subject Mismatch between Document Info and XMP metadata

    As far as I can tell, when generating PdfA-1b files I am completely compliant with the spec. Yet when I try to preflight verify my output I get the following error: "Subject mismatch between Document Info and XMP metadata".
    Here is my Document Info:
       /Title (Title)
       /Author (Author)
       /Subject (Subject)
       /Keywords (Key Words)
       /Creator (Creator)
       /Producer (Producer)
       /CreationDate (D:00010101000000)
       /ModDate (D:00010101000000)
    Here is my XMP Stream:
        Key Words
        Producer
        Title
        Subject
            Author
        Creator
        0001-01-01T00:00:00.0011111
        0001-01-01T00:00:00.0022222
        1
        B
    Am I missing something?
        Subject
    vs
       /Subject (Subject)
    It seems like it should be fine.
    -Rick

    You have a disconnect with regard to how Document Info fields are to be mapped to XMP Dublin Core (dc) data fields:
    - Document Info Subject -> dc:description
    [nobody claims this is intuitive, but it is indeed specified reasonably well]]
    The following is not required in your case, but for your info I include it anyway:
    - Document Info Keywords -> dc:subject
    Your best source for this is the actual PDF/A-1 standard (ISO 19005-1, can be purchased form www.iso.org).
    A very good companion for such type of topics are the TechNotes from the PDF/A Competence Center (see www.pdfa.org), downloadable free of charge.
    HTH.
    Olaf Drümmer

  • How to get XMP MetaData as an XML String in a process?

    Hi there,
    I have a process where I would like to export a documents XMP MetaData, manipulate the XMP MetaData and then import the MetaData again to the document.
    I thougt first I will use the service Name "XMPUtilityService" with the Service Operation "Export XMP" to export the XMP MetaData as a document.
    Hoewer I am not sure how to manipulate the output document from the Export XMP service.
    When I print out the document.toString() in a execute Script Service I get the following:
    <document state="active" senderVersion="0" persistent="false" senderPersistent="false" passivated="false" senderPassivated="false" deserialized="false" senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="3440" contentType="null" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="A...</inline><senderPullServantJndiName/><attributes/></document>
    Actually I expected something like this:
    <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-jc006 DEBUG-1.0, 2009 Jun 23 11:07:21-PDT">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
          <rdf:Description rdf:about=""
                xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
             <pdf:Producer>Adobe LiveCycle PDF Generator ES2</pdf:Producer>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmp="http://ns.adobe.com/xap/1.0/">
             <xmp:ModifyDate>2010-04-20T20:43:59+02:00</xmp:ModifyDate>
             <xmp:MetadataDate>2010-04-20T20:43:59+02:00</xmp:MetadataDate>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
             <xmpMM:DocumentID>uuid:0cf2c6c6-2fba-2b39-5fb6-33ad8ccf58aa</xmpMM:DocumentID>
             <xmpMM:InstanceID>uuid:187bc5a2-acb0-2fa9-711d-33ad8ccf58aa</xmpMM:InstanceID>
          </rdf:Description>
       </rdf:RDF>
    </x:xmpmeta>
    <?xpacket end="w"?>
    What do I need to do to get the XMPMeta data as an XML String from a document within a process?
    Thanks in advance!
    Paul

    Hi,
    thanks for the answer.
    I know that I can retrieve the XMPUtilityMetadata object, but this object provides only access to a few information suche as creator, subject, producer, etc.
    However I would like to retrieve the whole XML String of the XMP Metadata.
    How is this possible?
    Thanks.
    Paul

  • [CS3 JS] Possible to Inspect Custom XMP Metadata With JavaScript?

    I am using custom XMP metadata in InCopy and InDesign docs in CS3 to hold custom metadata that can vary wildly. I know the full set of possible items but not what values will be in a particular document.
    Short of writing the XMP to a file and then processing that from my script, is there a way to inspect the custom properties from JavaScript. I didn't see a way to do it from the data model.
    Thanks,
    Eliot

    Here is another script to catch MetaData, some more than the basic:
    // metaDataOfLinks.jsx
    //DESCRIPTION: Catches MetaData of linked images and creates a report at the DeskTop.
    // Martin Fischer 10/2008
    var myLinkXmpArray = ["author", "copyrightInfoURL", "copyrightNotice", "copyrightStatus   ", "creationDate", "creator", "description", "documentTitle", "format", "jobName", "keywords", "modificationDate", "serverURL"];
    var myIPTCArray = ["CiAdrCity", "CiAdrCtry", "CiAdrExtadr", "CiAdrPcode", "CiAdrRegion", "CiEmailWork", "CiTelWork", "City", "CiUrlWork", "CopyrightNotice", "Country", "CountryCode", "Creator", "CreatorContactInfo", "CreatorJobtitle", "DateCreated", "Description", "DescriptionWriter", "Headline", "Instructions", "IntellectualGenre", "JobID", "Keywords", "Location", "Provider", "Province-State", "RightsUsageTerms", "Scene", "Source", "SubjectCode", "Title"];
    var myPSArray = ["photoshop:AuthorsPosition", "photoshop:CaptionWriter", "photoshop:Category", "photoshop:City", "photoshop:Country", "photoshop:Credit", "photoshop:DateCreated", "photoshop:Headline", "photoshop:Instructions", "photoshop:Source", "photoshop:State", "photoshop:SupplementalCategories", "photoshop:TransmissionReference", "photoshop:Urgency"];//var myPSArray = ["photoshop:AuthorsPosition", "CaptionWriter", "Category", "City", "Country", "Credit", "DateCreated", "Headline", "Instructions", "Source", "State", "SupplementalCategories", "TransmissionReference", "Urgency"];
    var myTiffArray = ["tiff:ImageWidth", "tiff:ImageLength", "tiff:BitsPerSample", "tiff:Compression", "tiff:PhotometricInterpretation", "tiff:Orientation", "tiff:SamplesPerPixel", "tiff:PlanarConfiguration", "tiff:YCbCrSubSampling", "tiff:YCbCrPositioning", "tiff:XResolution", "tiff:YResolution", "tiff:ResolutionUnit", "tiff:TransferFunction", "tiff:WhitePoint", "tiff:PrimaryChromaticities", "tiff:YCbCrCoefficients", "tiff:ReferenceBlackWhite", "tiff:DateTime", "tiff:ImageDescription", "tiff:MakeProperName", "tiff:Model", "tiff:Software", "tiff:Artist", "tiff:Copyright"];
    var myExifArray = ["exif:ExifVersion", "exif:FlashpixVersion", "exif:ColorSpace", "exif:ComponentsConfiguration", "exif:CompressedBitsPerPixel", "exif:PixelXDimension", "exif:PixelYDimension", "exif:UserComment", "exif:RelatedSoundFile", "exif:DateTimeOriginal", "exif:DateTimeDigitized", "exif:ExposureTime", "exif:FNumber", "exif:ExposureProgram", "exif:SpectralSensitivity", "exif:ISOSpeedRatings", "exif:OECF", "exif:ShutterSpeedValue", "exif:ApertureValue", "exif:BrightnessValue", "exif:ExposureBiasValue", "exif:MaxApertureValue", "exif:SubjectDistance", "exif:MeteringMode", "exif:LightSource", "exif:Flash", "exif:FocalLength", "exif:SubjectArea", "exif:FlashEnergy", "exif:SpatialFrequencyResponse", "exif:FocalPlaneXResolution", "exif:FocalPlaneYResolution", "exif:FocalPlaneResolutionUnit", "exif:SubjectLocation", "exif:ExposureIndex", "exif:SensingMethod", "exif:FileSource", "exif:SceneType", "exif:CFAPattern", "exif:CustomRendered", "exif:ExposureMode", "exif:WhiteBalance", "exif:DigitalZoomRatio", "exif:FocalLengthIn35mmFilm", "exif:SceneCaptureType", "exif:GainControl", "exif:Contrast", "exif:Saturation", "exif:Sharpness", "exif:DeviceSettingDescription", "exif:SubjectDistanceRange", "exif:ImageUniqueID", "exif:GPSVersionID", "exif:GPSLatitude", "exif:GPSLongitude", "exif:GPSAltitudeRef", "exif:GPSAltitude", "exif:GPSTimeStamp", "exif:DateTimeOriginal,", "exif:DateTimeDigitized.", "exif:GPSTimeStamp", "exif:GPSSatellites", "exif:GPSStatus", "exif:GPSMeasureMode", "exif:GPSDOP", "exif:GPSSpeedRef", "exif:GPSSpeed", "exif:GPSTrackRef", "exif:GPSTrack", "exif:GPSImgDirectionRef", "exif:GPSImgDirection", "exif:GPSMapDatum", "exif:GPSDestLatitude", "exif:GPSDestLongitude", "exif:GPSDestBearingRef", "exif:GPSDestBearing", "exif:GPSDestDistanceRef", "exif:GPSDestDistance", "exif:GPSProcessingMethod", "exif:GPSAreaInformation"];
    var myCameraRawArray = ["crs:AutoBrightness", "crs:AutoContrast", "crs:AutoExposure", "crs:AutoShadows", "crs:BlueHue", "crs:BlueSaturation", "crs:Brightness", "crs:CameraProfile", "crs:ChromaticAberrationB", "crs:ChromaticAberrationR", "crs:ColorNoiseReduction", "crs:Contrast", "crs:CropTop", "crs:CropLeft", "crs:CropBottom", "crs:CropRight", "crs:CropAngle", "crs:CropWidth", "crs:CropHeight", "crs:CropUnits", "crs:Exposure", "crs:GreenHue", "crs:GreenSaturation", "crs:HasCrop", "crs:HasSettings", "crs:LuminanceSmoothing", "crs:RawFileName", "crs:RedHue", "crs:RedSaturation", "crs:Saturation", "crs:Shadows", "crs:ShadowTint", "crs:Sharpness", "crs:Temperature", "crs:Tint", "crs:ToneCurve", "crs:ToneCurveName", "crs:Version", "crs:VignetteAmount", "crs:VignetteMidpoint", "crs:WhiteBalance"];
    var myInfo = new Array;
    var myDoc = app.activeDocument;
    var myLinks = app.documents[0].links;
    for ( i = 0; i < myLinks.length; i++)
       getMetaData ( myLinks[i] );
    writeData ( 'Metadaten zu ' + myDoc.name + '\r-----------\r\r' + myInfo.join ( '\r\r'), File ('~/Desktop/Metadaten_' + myDoc.name.replace(/.indd$/, '') + '.txt'));
    // ===============================================================
    //                                  Funktionen
    // ===============================================================
    function getMetaData ( aLink )
       var myLinkXmp = aLink.linkXmp.properties.toSource().replace( /^\(\{/,'' ).replace (/\)\}$/,'').replace( /parent.+$/,'').replace(/:/g, ':\t').split( ', ');
       var myString = aLink.name;
       myString += loopLinkXmp ( aLink, myLinkXmpArray );
       myString += loopArray ( aLink, "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/",  "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:",  myIPTCArray);
       myString += loopArray ( aLink, "http://ns.adobe.com/photoshop/1.0/",  "", myPSArray );
       myString += loopArray ( aLink, "http://ns.adobe.com/tiff/1.0/", "", myTiffArray );
       myString += loopArray ( aLink, "http://ns.adobe.com/exif/1.0/", "", myExifArray );
       myString += loopArray ( aLink, "http://ns.adobe.com/camera-raw-settings/1.0/",  "", myCameraRawArray );
       myInfo.push( myString.replace( /, $/,'') );
    function loopArray( aLink, s1, s2, anArray )
       var temp = '\r\t--- ' + s1 + ' ---\r\t';
       for ( var a = 0; a < anArray.length; a++)
          try {
             var theEvalString = 'aLink.linkXmp.getProperty(\"' + s1 + '\", \"' + s2 + anArray[a] + '\")';
             var myCode = eval( theEvalString );
             if ( myCode != '' )
                temp += '[' + anArray[a] + ']\t' +  myCode + '\r\t'; 
          } catch (e){ //temp +=e + '\r'
       return temp;
    function loopLinkXmp( aLink, anArray )
       var temp = '\r\t--- LinkMetadata ---\r\t';
       for ( var a = 0; a < anArray.length; a++)
          try {
             var theEvalString = 'aLink.linkXmp.' + anArray[a] ;
             var myCode = eval( theEvalString );
             if ( myCode != '' )
                temp += '[' + anArray[a] + ']\t' +  myCode + '\r\t'; 
          } catch (e){ //temp +=e + '\r'
       return temp;
    function writeData ( aData, theFile )
       theFile.open ( 'w', 'Text', 'R*ch' );
       theFile.encoding = 'UTF-8';
       theFile.write ( aData );
       theFile.close ();
    Ressources:
    Adobe XMP Developer Center: http://www.adobe.com/devnet/xmp/
    XMP Specification: http://www.adobe.com/devnet/xmp/pdfs/xmp_specification.pdf
    Martin Fischer

  • XMP Metadata Error when creating PDF/A-1b

    Hello,
    I just started using Adobe Acrobat X for Mac to create PDF/A-1b documents from scanned TIFs.  I created a script in the Action Wizard to 1) Combine Files into a Single PDF; 2)Downsample image resolution to 150 ppi (bitmaps to 300 ppi); 3) Recognize Text;4) Pause to find all suspects and make corrections to incorrect OCR; 5) Convertto PDF/A-1b (sRGB); and 6) Verify compliance with PDF/A-1b.
    When I use the Action Wizard to to execute the script above I receive an error message stating "Metadata does not conform to XMP."  However, when I execute each of the actions manually I do not receive the XMP metadata error.  It takes a long time to execute each action manually, so I am hoping there is some way to make this full script work in the Action Wizard.
    I have an open case with Adobe regarding this issue, but so far no solutions.

    I do not receive an error when the "Verify compliance with PDF/A-1b" action is removed from the script.  Does this action have to be performed separately to avoid the XMP metadata error?

  • How do I view XMP metadata in Adobe Reader?

    How do I view XMP metadata in Adobe Reader?
    I've created a PDF which (I believe) includes XMP metadata, and I'd obviously like to check that it's been done correctly.  However it's not obvious how to view this within Adobe Reader (I'm using 11.0.04 on OS X).  Googling around, I've found an off-hand remark that Reader isn't able to do this, but this is obviously insane -- what's the point of licensing metadata if no-one can see it?  What is it I'm missing?
    Best wishes,
    Norman

    I've put a PDF at http://nxg.me.uk/temp/part1.pdf This does display/print perfectly OK in both Reader and in OS X Preview.  I presume that the /Root object (254) is inside one of the ObjStm streams (yes?), as (presumably) are the /Page streams and the reference to the /Metadata object, 52.
    Regarding scanning, Part 3 of the XMP spec, Sect 1.2 says "It is always best to use format-aware file parsing when possible. Lacking this information, applications can find XMP packets by scanning the file."  Also, in Sect. 1.2.1, "A file should be scanned byte-by-byte until a valid header is found."   Finally, ISO-32000-1 Sect. 14.3.2, Note 3, says "[The XMP spec] includes a method to embed XML data within non-XML data files in a platform-independent format that can be easily located and accessed by simple scanning rather than requiring the document file to be parsed."  So it would appear that this metadata packet _should_ be found.

  • Size limit for XMP metadata to be added externally to a file's metadata

    Hi,
    There is a situation where I need to add some 'text data' to the metadata of Adobe Illustrator document, in XMP format. The data being added is in the form of Array Item. While adding the data, I found that, after certain limit, the data addition is not happening. I read in the XMP Specification Part:3 that, the StandardXMP meta object(JPEG) can have size of 64 KB. It can be extended using ExtendedXMP object further..
    Is this limit applicable to text data also?
    Is there a limit on having such ExtendedXMP chunks?
    Will the data in ExtendedXMP be considered in same way as that of in StandardXMP?

    Hi,
    Your understanding is correct.
    I am able to add the metadata up to a certain point of time. After that as the CanPutXMP is failing, I am not able to put XMP packet inside the file.
    There is XMPMeta object - meta, which is derived from an AI file.
    SXMPMeta meta;
    myFile.GetXMP(&meta);
    //modifications appended to meta.
    string metaBuffer;
    meta.SerializeToBuffer(&metaBuffer);
    if(myFile.CanPutXMP(meta))
      // If so then update the file with the modified XMP
      myFile.PutXMP(meta);
    after certain point of time CanPutXMP is failing.
    Will you please tell me how to handle the CanPutXMP situation? What are probable causes for the same? I tried to google on it, but did not get satisfactory explanation.

  • Adding/Reading XMP Metadata in a psd file

    Hi,
    I'm having some troubles to understand how to add and read XMP metadata on a psd file. I followed the Panel developer guide tutorial, and try to look on the internet for some answers, but I'm still stuck ...
    Here is the simple example I'm trying to make (using part of the code from the panel developer guide) :
         The function loads the XMP Script Library.
         @returns True if the XMP Script Library was loaded successfully.
         @type Boolean
    function loadXMPLibrary(){
         if ( !ExternalObject.AdobeXMPScript ){
              try{
                   ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
              }catch (e){
                   alert("Can't load XMP Script Library");
                   return false;
         return true;
         The function unloads the XMP Script Library.
    function unloadXMPLibrary(){
         if( ExternalObject.AdobeXMPScript ) {
              try{
                   ExternalObject.AdobeXMPScript.unload();
                   ExternalObject.AdobeXMPScript = undefined;
              }catch (e){
                   alert("Can't unload XMP Script Library");
        Try to put a new property into the metadata
    if( app.activeDocument || !loadXMPLibrary()){
        var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
        xmp.setProperty( XMPConst.NS_EXIF, "myProperty", "test" );
        activeDocument.xmpMetadata.rawData = xmp.serialize();
        unloadXMPLibrary();
        Window.alert(activeDocument.xmpMetadata.rawData);
    I don't really know where I'm wrong, could you help me please ?
    Thanks,
    Julien

    Rather mess with EXIF and Dublin Core namespaces, wouldn't it be better to create your own?
    IE:
    #target photoshop
    addtoMeta();
    function addtoMeta(){
    if(!documents.length) return;
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);
    var myNamespace = "http://my.fantastic.newspace/";
    var myPrefix = "nsfns:";
    XMPMeta.registerNamespace(myNamespace, myPrefix);
    xmp.setProperty(myNamespace, "myProperty", "A Test String");
    app.activeDocument.xmpMetadata.rawData = xmp.serialize();

  • Solution to view XMP metadata in Adobe Reader ???

    Hello,
    I´m trying to find a solution to view the xmp metadata with the adobe reader.
    I know I´m able to view and edit the xmp metadata with adobe acrobat, but is it possible with the adobe reader?
    What version will I need?
    Moreover is it possible to realize two or more panels in one datafile?
    Up to now I need one file for one panel.
    Any suggestions?
    Thanks!

    I've put a PDF at http://nxg.me.uk/temp/part1.pdf This does display/print perfectly OK in both Reader and in OS X Preview.  I presume that the /Root object (254) is inside one of the ObjStm streams (yes?), as (presumably) are the /Page streams and the reference to the /Metadata object, 52.
    Regarding scanning, Part 3 of the XMP spec, Sect 1.2 says "It is always best to use format-aware file parsing when possible. Lacking this information, applications can find XMP packets by scanning the file."  Also, in Sect. 1.2.1, "A file should be scanned byte-by-byte until a valid header is found."   Finally, ISO-32000-1 Sect. 14.3.2, Note 3, says "[The XMP spec] includes a method to embed XML data within non-XML data files in a platform-independent format that can be easily located and accessed by simple scanning rather than requiring the document file to be parsed."  So it would appear that this metadata packet _should_ be found.

Maybe you are looking for

  • I can't. Print from my iPad2 why

    HP 5510 all in one air printer Can't find printer

  • Applications Roles in FMW (Enterprise Manager) OBIEE11g

    Hi, Please specify, how to migrate new created Application roles in production from Test @Enterprise Manager (FMW). Regards Rahul

  • Screen becomes black during the connection is based.

    Since two day, every time if I call somebody as soon as the phone the connection is based the display becomes black. It is the same problem, if I select someone from the contacts or I gives a number. If I press the off/on button the call ends. If I d

  • [SOLVED]BCM4322 driver not building

    I'm trying to build this driver (64-bit) with these instructions , and when I use make or make clean, it returns KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` make: *** /lib/modules/3.0-ARCH/build: no such file or directory. Stop.

  • Re: 7th day of Sysmas sweepstakes! Feelin' lucky?

    An EMP bomb... * New gear (Iphone, laptop, switches, servers,...) payed by the insurance... * Long holiday during shipping off the gear, without any interruptions because nothing can be wrong, there's no gear left... * Clean start in sharepoint, data