Copy link to clipboard
Copied
Hi all,
having a small problem with the script that creates texframe and places all the link name in that textframe
var myDocument = app.activeDocument; var myText = myDocument.textFrames.add(); var links = myDocument.links; for( var i=0; i<=links.length-1; i++ ){ myText.contents = links.name +"\r"; } app.activeDocument.stories.everyItem().textFrames.everyItem().fit(FitOptions.FRAME_TO_CONTENT);
also tried this
myText.fit(FitOptions.FRAME_TO_CONTENT);
Copy link to clipboard
Copied
Hi,
at least you've got to specify the width of the textframe, so that it can be handled:
for example:
var myDocument = app.activeDocument;
var myTextframe = myDocument.textFrames.add({geometricBounds:[0,0,100,100]});
var linkNames = (myDocument.links.everyItem().name).join(', ');
myTextframe.contents = linkNames;
myTextframe.fit(FitOptions.FRAME_TO_CONTENT)
Hans-Gerd Claßen