Copy link to clipboard
Copied
Hello,
I have a Indesign book with several documents.
I would like the xmp "description" tag (different for each document) in document page footers
Is this possible, or is there an other solution?
Thanks, Regards
Copy link to clipboard
Copied
Hi
If I understand well, you want to use some sort of "caption", using metada "description".
If that so, it's easy to, using variables.
See here: Create captions in InDesign
Hope that helps
regards
Copy link to clipboard
Copied
Hi,
Yes, exept that this seems only to work with included images in the page.
I need the xmp tags of the Indesign file it self.
How is that possible ?
Regards
Copy link to clipboard
Copied
Hi
I wrote an utility a couple of years ago. It's a startup scripts that will add custom variables to the doc such as XMP infos.
See details here
Ajoutez des variables très personnalisées dans InDesign | Ozalto
Copy link to clipboard
Copied
Waouh, c'est de la transmission de pensée...
Copy link to clipboard
Copied
De fait et merci pour la recommendation.
Copy link to clipboard
Copied
Hi,
Yes in my first request : Is this possible, or is there an other solution?
What I want to do :
Set up a variable in Main book template printed on all pages BUT with a different contents per document, so linked to the document contained in the book.
Thanks for your help
Regards
Copy link to clipboard
Copied
Hi, I tried the proposed script to add some custom variables to indesign, I got the following errors :
"Valeur incorrecte pour la propriété définie 'contents'. Attendait string or specialcharacters enumerator, mais a reçu()"
I run indesing CC 2007.0 on PC Windows 10
Thanks for your help
Regards
Copy link to clipboard
Copied
I can understand the nature of the error. Which property would you try to use ?
Copy link to clipboard
Copied
I modified the scrip in that way :
function addVariables(openEvent){
var doc = openEvent.parent
while ( doc.constructor.name != "Document" )
{
if ( doc.constructor.name == "Application" ){ return;
doc = doc.parent;
}
//Adding User name to text variables
createTextVariable(doc, "Utilisateur", (Folder.myDocuments).parent.displayName );
createTextVariable(doc, "XMP Auteur", doc.metadataPreferences.author, true );
createTextVariable(doc, "XMP Description", doc.metadataPreferences.description, true );
createTextVariable(doc, "XMP Copyright Info URL", doc.metadataPreferences.copyrightInfoURL, true );
createTextVariable(doc, "XMP Copyright", doc.metadataPreferences.copyrightNotice, true );
createTextVariable(doc, "XMP Titre du document", doc.metadataPreferences.documentTitle, true );
createTextVariable(doc, "XMP Createur", doc.metadataPreferences.creator, true );
createTextVariable(doc, "XMP Mots Clés", doc.metadataPreferences.keywords, true );
}
//Generic function to add static custom text variables
function createTextVariable(target, variableName, variableContents, bRewrite){
var usernameVariable = target.textVariables.itemByName(variableName);
if(!usernameVariable.isValid){
usernameVariable = target.textVariables.add();
usernameVariable.variableType = VariableTypes.CUSTOM_TEXT_TYPE;
usernameVariable.name = variableName;
if ( variableContents == undefined) { usernameVariable.variableOptions.contents = ""; }
else { usernameVariable.variableOptions.contents = variableContents; }
}
bRewrite!==false && usernameVariable.variableOptions.contents = variableContents;
}
But it does not help
In the xmp window, I have also a "Title" tag, but I do not find the "metadataPreferences" property linked to it, where can I find a complete documentation of Indesing scripting objects ?
I tried .title, .authorTitle (none worked)
Thanks for your help
Regards
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Many thanks, It's OK, It does what I need
Best regards
Copy link to clipboard
Copied
Hi,
I think you need a script for that.
Maybe Loic.Aigon might help you out there, I know he's been dealing with custom variables.
Please note you can import an INDD into another one and use XMP metadata, just like a graphic. (But what's the point here?)
Besides, do you really need to use XMP metadata?
Maybe there are other (simpler) ways that would do the trick, depending on what you want to achieve.
Copy link to clipboard
Copied
In the xmp window, I have also a "Title" tag, but I do not find the "metadataPreferences" property linked to it…
The metadataPreferences object only hosts a few items. You could think of using the XMP lib object to introspect other properties but as the file would be open it would fail. Or you would have to silently generate a copy of the file to introspect this and later delete it but that could be problematic maybe.
Copy link to clipboard
Copied
Hi, Thanks for your remark on XMP "title" tag