• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script for adding spot colors and page count of document into metadata

New Here ,
Mar 17, 2018 Mar 17, 2018

Copy link to clipboard

Copied

Does anyone know of a script that can add metadata in indesign stating any spots used and page count?

TOPICS
Scripting

Views

473

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 18, 2018 Mar 18, 2018

Copy link to clipboard

Copied

I am guessing that this is possible with a script and it is certainly possible with ExifTool (however the result may not be too pretty without some extra work to clean up the raw results)…

However as well as knowing the source metadata (spot colours and page count), what is the destination metadata field/tag? Is it a single field and if so, which one and what is the preferred order of the data? Is it a separate field for both and if so which? What happens if there is any existing data in the destination metadata field/s?

There may be more questions, these are just the first that spring to mind…

EDIT: ExifTool (and Bridge) appears to only report on the first 2 pages of a 2+ page INDD file, so only the spot colours can reliably be reported… So an InDesign script still appears to be the best bet!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

The flag can go in any of the metadata field as long as it's visible by search. ie. Colors used: blah blah blah ; Pagecount: blah blah.

Thanks for your reply

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

How will you search? What software, OS etc? Knowing the search method will help to find the appropriate metadata field to write to.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2018 Mar 26, 2018

Copy link to clipboard

Copied

It appears that I was looking at the page preview feature, which defaults to 2 pages, so if looking to use this feature this has to be taken into account… So there is likely a better way using scripting, based on the actual pages and not the previews which is all that I can leverage outside of scripting using ExifTool.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2018 Mar 26, 2018

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2018 Mar 26, 2018

Copy link to clipboard

Copied

LATEST

Yes I did and replied over there, thanks again for the tip! This is beyond my meagre scripting skills, however I may still explore ExifTool in order to practice my regex.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 20, 2018 Mar 20, 2018

Copy link to clipboard

Copied

You can access document metadata by script:

app.activeDocument.metadataPreferences;

There are certain built-in fields; I've used documentTitle and description. You could also add an array of keywords:

app.activeDocument.metadataPreferences.keywords = ["Colors used: xxx,yyy,zzz", "Pagecount: nnn""].

As Steven_A_Marsh has said, a lot depends on how you intend to search for this information. Certainly another script could slice the keywords.

Bob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines