Question

I'm trying to integrate with Adobe InDesign, HP SmartStream, and XMP Metadata format. Below I have a snippet of the xml that I'm working with out of the IDML metadata.xml file. There are instance and document id's, in the XML, are these generated randomly, or are they specific type of hash, or something else entirely? I need to generate files like this. Additionally, does anyone know of a better source of information over this meta file? I've been digging through Adobes documentation but every document seems to lead me to another.

<xmpMM:DerivedFrom rdf:parseType="Resource">
    <stRef:instanceID>xmp.iid:679F6CA9302668118C14A18AA97898A6</stRef:instanceID>
    <stRef:documentID>xmp.did:F7416EEA182068118083BC84E35D00D0</stRef:documentID>
    <stRef:originalDocumentID>xmp.did:F7416EEA182068118083BC84E35D00D0</stRef:originalDocumentID>
    <stRef:renditionClass>default</stRef:renditionClass>
</xmpMM:DerivedFrom>
<xmpMM:Manifest>
    <rdf:Bag>
        <rdf:li rdf:parseType="Resource">
            <stMfs:linkForm>ReferenceStream</stMfs:linkForm>
            <stMfs:reference rdf:parseType="Resource">
                <stRef:instanceID>uuid:90f0c8a7-2814-ed43-8557-672122f6924d</stRef:instanceID>
                <stRef:documentID>uuid:f99b8252-e392-45bd-a8f3-c845a8f14e15</stRef:documentID>
                <stRef:lastURL>file:///Path/To/PDF.pdf</stRef:lastURL>
            </stMfs:reference>
            <xmpMM:placedXResolution>72.00</xmpMM:placedXResolution>
            <xmpMM:placedYResolution>72.00</xmpMM:placedYResolution>
            <xmpMM:placedResolutionUnit>Inches</xmpMM:placedResolutionUnit>
        </rdf:li>
        .
        .
        .
        <rdf:li rdf:parseType="Resource">
             <stMfs:linkForm>ReferenceStream</stMfs:linkForm>
             <stMfs:reference rdf:parseType="Resource">
                 <stRef:instanceID>uuid:5245EF7C528E11DA951BB478EA16A7D6</stRef:instanceID>
                 <stRef:documentID>uuid:5245EF7B528E11DA951BB478EA16A7D6</stRef:documentID>
                 <stRef:lastURL>file:///Path/To/EPS.eps</stRef:lastURL>
             </stMfs:reference>
             <xmpMM:placedXResolution>72.00</xmpMM:placedXResolution>
             <xmpMM:placedYResolution>72.00</xmpMM:placedYResolution>
             <xmpMM:placedResolutionUnit>Inches</xmpMM:placedResolutionUnit>
        </rdf:li>
        <rdf:li rdf:parseType="Resource">
             <stMfs:linkForm>DirectStream</stMfs:linkForm>
             <stMfs:reference rdf:parseType="Resource">
                <stRef:instanceID>xmp.iid:60B74D5C85A5E0118B24913025BE159A</stRef:instanceID>
                <stRef:documentID>adobe:docid:photoshop:14ee6e6c-eb90-11dd-a5fb-e51dc86f9044</stRef:documentID>
                <stRef:originalDocumentID>adobe:docid:photoshop:14ee6e6c-eb90-11dd-a5fb-e51dc86f9044</stRef:originalDocumentID>
                <stRef:lastURL>file:///Applications/Adobe%20InDesign%20CS6/Plug-Ins/SmartStream/Designer/Resources/SmartStreamDefault.tif</stRef:lastURL>
             </stMfs:reference>
             <xmpMM:placedXResolution>300.00</xmpMM:placedXResolution>
             <xmpMM:placedYResolution>300.00</xmpMM:placedYResolution>
             <xmpMM:placedResolutionUnit>Inches</xmpMM:placedResolutionUnit>
        </rdf:li>
    </rdf:Bag>
</xmpMM:Manifest>
Was it helpful?

Solution

Select a picture in InDesign and run the script

var c = app.documents[0].selection[0].graphics;
var myfilePath = c[0].itemLink.filePath;
var k = c[0].itemLink.linkXmp.properties;

alert(k.toSource().replace( new RegExp(",",'g'),"\r" ))

var myFile = File(myfilePath);
    xmpFile = new XMPFile(myFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
    xmp = xmpFile.getXMP();
    var myXmp = xmp.serialize();

    alert (myXmp.toSource())
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top