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

A script to add annotations to CC library objects

New Here ,
Apr 02, 2020 Apr 02, 2020

Copy link to clipboard

Copied

Hopefully someone will be able to help me here. I create mockups of eDMs in InDesign for client approvals. In my CC library I have mockups of 70-80 modules that replicate visually the HTML modules that the developer uses to build the final eDM. Once the eDM layout is approved and ready for build I will export all the images the developer requires and a pdf of what the eDM looks like. A very time consuming part of this output is to annotate each module in inDesign so that the developer knows which module I've used. Is there a way to write a script that I can apply to the modules in my CC library so that when I export the pdf, in a slug area to the left or right of the layout, the annotations appear automatically? Thanks for you help in advance.

TOPICS
How to , Import and export , Scripting

Views

789

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 ,
Apr 26, 2020 Apr 26, 2020

Copy link to clipboard

Copied

A quick assessment and vague understanding of what you're doing, leads me to think it might be a good reason to start using XML tagged content. But in order to do so, you first need to prepare all parts (tagged with labels) in InDesign, create a new CC Library from that, and start using these items in your new designs. Quite a task, but this might help you to get such tags over to a panel in the PDF.

https://helpx.adobe.com/indesign/using/xml.html

https://helpx.adobe.com/indesign/using/structuring-pdfs.html

It won't be a super neat implementation, like having some information nicely positioned alongside the layout, but it's goig to be a clickable panel in Acrobat.

 

Another interesting feature might be the automatic generation of image captions. You can let the name of the file or (hopefully) CC fragment serve as a caption, and automatically position that caption somewhere in the layout, near the placed part.

https://helpx.adobe.com/indesign/using/captions.html

 

These are all built-in features – no need for scripting.

But if some one says "hey, I've got or create a script for you", that would certainly trump all my suggestions !

And if you're very serious about having a more systematic approach, then have a look at what Adobe Experience Cloud can do for you...

https://www.adobe.com/experience-cloud/topics/email-marketing.html

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 ,
Apr 26, 2020 Apr 26, 2020

Copy link to clipboard

Copied

What is an eDM? Even a Google search only produces "electronic dance music"!

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 ,
Apr 26, 2020 Apr 26, 2020

Copy link to clipboard

Copied

I bet it's a marketeers acronym for electronic Direct Mail – a fancy email, that is 😉

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 ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

You could set the Script Label for each Library item to the module name you need (Window>>Utilities>>Script Label). 

Then set, say, a 1 inch slug at the left of each document. You could set a Paragraph Style for the slug, in this case, SlugStyle. Assuming the module info is one line, you could execute this script with the asset selected with your black arrow tool to populate the slug area using this script:

 

 

 

var pageItemLabel = app.selection[0].label;
var docHeight = app.activeDocument.documentPreferences.pageHeight;
var slugText = app.activeDocument.textFrames.add();
slugText.contents = pageItemLabel;
slugText.geometricBounds = [0, -1, docHeight, 0];
slugText.paragraphs.everyItem().appliedParagraphStyle = "SlugStyle";

 

 

Note this is all done using inches. There's different ways to handle measurement units in scripting. 

Are more than one module used? If so, this may need some tweaking. 

Then, upon exporting the document, you would just include Slug as part of the export. 

 

 

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
Guide ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

Hi,

 

We have a script that will add a label to an object ( free ). ObjectNotes. here:

http://www.kerntiff.co.uk/products-4-indesign/objectnotes

 

We also have an InDesign plugin (not free) that will export the object notes, alsoe InDesign notes and track changes deletes as PDF annotations.

 

P.

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 ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

Hi Tony,

you say:

…Is there a way to write a script that I can apply to the modules in my CC library so that when I export the pdf, in a slug area to the left or right of the layout, the annotations appear automatically?…

 

If the modules are already stored as assets into your CC library: No. That's not possible.

CC libraries are not part of the InDesign document object model (DOM) for scripting.

 

If your libraries were InDesign libarary files, then yes. This could be done with scripting.

 

FWIW: If you are willing to prepare all page items before you store them in a CC library, the answer is also: Yes.

 

Regards,
Uwe Laubender

( ACP )

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
Guide ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

LATEST

Hello Uwe,

"

If the modules are already stored as assets into your CC library: No. That's not possible.

CC libraries are not part of the InDesign document object model (DOM) for scripting."

 

That is a shame. It would be nice if the Adobe InDesign developers added this for the scripting community. I have a feeling it might be possible from C++, never tried it.

 

Best.

 

P.

 

 

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