Copy link to clipboard
Copied
any snippet that will let me insert my name automatically into the file info under "description writer"
ie...
copyrightNotice = "© 2015 XXXXX";
scott
"Yes" on what question, please?
copyrightNotice is part of the changeable metadata: Adobe InDesign CS6 (8.0) Object Model JS: MetadataPreference
but "description writer" is not. Possibly there is such a field in a PDF's metadata but not all can be written as easily -- see the link for the fields that can.
Copy link to clipboard
Copied
Changing metadata through a script is easy (search this forum for examples), but what do you mean with "automatically"? When the script is run? For all new documents? Right before you save a document?
Copy link to clipboard
Copied
yes---but i am unable to find the proper wording to insert information in "description writer" area of the metadata
scott
Copy link to clipboard
Copied
"Yes" on what question, please?
copyrightNotice is part of the changeable metadata: Adobe InDesign CS6 (8.0) Object Model JS: MetadataPreference
but "description writer" is not. Possibly there is such a field in a PDF's metadata but not all can be written as easily -- see the link for the fields that can.
Copy link to clipboard
Copied
yes was to changing metadata is easy. thanks for confirming what i was afraid of...that "description writer" was not editable via script
Copy link to clipboard
Copied
Hi all,
What about the XMP Library documented in the JavaScript Tools Guide CC pdf file. It allows you to reach files inner XMP metadata. Then you can edit metadata outside the InDesign Object Model.
I use it in many scripts.
Unless I misunderstood something ?
Loic
Copy link to clipboard
Copied
Loic, can you write up an example? I'm only familiar with the immediately accessible parts of PDFs.
Copy link to clipboard
Copied
Hi Jongware,
Sure !
if (ExternalObject.AdobeXMPScript == undefined) {
ExternalObject.AdobeXMPScript = new
ExternalObject('lib:AdobeXMPScript');
}
var f = File ( Folder.desktop+"/toto.pdf" );
var xmpFile = new XMPFile(f.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
var xmp = xmpFile.getXMP();
xmp.deleteProperty(XMPConst.NS_DC, "rights");
xmp.appendArrayItem(XMPConst.NS_DC, "rights", "This is how I rule the world", 0,XMPConst.ARRAY_IS_ORDERED);
if (xmpFile.canPutXMP(xmp)) {
xmpFile.putXMP(xmp);
}
xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);

No merits here, just copy/pasted the doc ![]()
I think Marijan also did great posts on his blog on this topic.
Loic
Copy link to clipboard
Copied
Hello,
did you mean this entry?
var _docXMP = app.activeDocument.metadataPreferences,
_destNamespace = "http://ns.adobe.com/photoshop/1.0/",
_destNodeName = "CaptionWriter",
_nodeValue = "Roland";
_docXMP.setProperty(_destNamespace, _destNodeName, _nodeValue);
$.writeln(_docXMP.getProperty(_destNamespace, _destNodeName));
Roland
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more