Page 1 of 1

Read Notes by script (not only write by script)

Posted: Thu Jun 29, 2017 8:50 am
by pedro.marques
I'm using scripts to count annotations, to create and add text, color, author to each note created on a image in photoshop.
But it isn't possible to get the content text of a note using scripts.

For example, there is an option when using the "PDF presentation" inner script to add the notes to acrobat PDF notes. This is working and it is great!
But it means also that it is possible, somehow, to read the content of each note to put it in a pdf annotation!

So the inner script "PDF presentation" does read the text of the notes!

If there is only a 'set' and not a 'get' on the listener, why is a get for the PDF presentation inner script?

Re: Read Notes by script (not only write by script)

Posted: Thu Jun 29, 2017 12:34 pm
by jaydoubleyou80
According to the great Mike Hale, circa 2010, there is no direct access to notes or annotations.

https://forums.adobe.com/thread/663347

I'm not sure if the metadata solution would work for you, but I've seen it mentioned in numerous places.

https://stackoverflow.com/questions/163 ... t-with-jsx

Re: Read Notes by script (not only write by script)

Posted: Thu Jun 29, 2017 4:06 pm
by pedro.marques
Thanks JayW,

in my case I need to use the data only on the app, even if I got it from some of the images opened.
So, I'm using $.setenv() and later $.getenv()

Re: Read Notes by script (not only write by script)

Posted: Mon Jul 03, 2017 5:07 pm
by Jaroslav Bereza
yes... this code should get first annotation descriptor but it fails. Notes seems to be write-only.

Code: Select all


var ref = new ActionReference();
var idannotation = stringIDToTypeID( "annotation" );
ref.putIndex( idannotation, 0 );
var desc = executeActionGet(ref);