How to get information from a found marker?

Adobe Community Professional ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

Dear Friends, experts and gurus!

To inspect markers I want to combine "Search for any Marker" and "Display Marker contents".

When a marker is found (by the Find method), i have a Text Range within a paragraph.

oTR.obj is Pfg

oTR.end.offset - oTR.beg.offset is 1 (the marker 'length').

But this is some sort of a dead end. I have no clue how to find out any useful information about the marker.

→ How to find through the maze of objects to the marker?

It may be that this is not possible at all with ExtendScript - and I need the approach via loop through all markers in the document (and visusalise them).

TOPICS
Scripting

Views

81

Likes

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

correct answers 1 Correct answer

Enthusiast , Mar 03, 2021 Mar 03, 2021
Hello Klaus,your find result is a textrange.Now you only have to this to get all markers in this pgf: var Markers = oDoc.GetTextForRange (oTR, Constants.FTI_MarkerAnchor); var FoundMarkers = []; for (var x = 0; x < Markers.length; x++) { var oTextItem = Markers[x]; FoundMarkers.push(oTextItem.obj) }

Likes

Translate

Translate
Enthusiast ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

Hello Klaus,

your find result is a textrange.

Now you only have to this to get all markers in this pgf:

 

  var Markers = oDoc.GetTextForRange (oTR, Constants.FTI_MarkerAnchor);
    var FoundMarkers = [];        
          
  
    for (var x = 0; x < Markers.length; x++)
        {
        var oTextItem = Markers[x];
        FoundMarkers.push(oTextItem.obj)
        }

 

 

Likes

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
Adobe Community Professional ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

LATEST

To the initiated many mysteries doe not exist.

Likes

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