@Sathya – you wrote:
I do not want to place the image in anchor frame
What do you exactly want then?
Placing the image at the found text position independent of the text frame? Just above the text having set the stacking order from background to foreground: 1. text frame, 2. image? Maybe obscuring the text?
Then I would add a tiny rectangle to the found text insertion point, reading out its position, remove the rectangle and move the placed image to the recorded position.
In regular text frames (not rotated ones) you could also read out the properties "horizontalOffset", "baseline" and "baselineShift" to calculate the x/y coordinates for the image to be placed.
For getting the right page to place the image you could use the "parentTextFrames.parentPage" of the found insertionPoint.
Thank you for the reply. I have placed the image to the found textframe parent.
Please see the piece of code below.
for(k = 0; k < myTagnames.length; k++)
app.findTextPreferences = null;
app.findTextPreferences.findWhat = myTagnames[k];
myFoundItems = app.activeDocument.findText();
for (var i = 0; i < myFoundItems.length; i++)
progress.value = i+1;
var myFile = File(myFilteredimages[i]);
myFrame = myFoundItems[i].parentTextFrames;
function PlaceIntoFrame(myFrame, myFile)
It works fine.
Sathya Rani M