-
1. Re: Another "Fit text frame to content" issue
Loic_aigon Nov 25, 2011 2:21 PM (in response to winterm)I had this kind of issue recently and my workaround was first to exagerately expand the text frame and then call pageItem.fit(FitOptions.FRAME_TO_CONTENT);
Hope it helps
-
2. Re: Another "Fit text frame to content" issue
winterm Nov 25, 2011 2:29 PM (in response to Loic_aigon)Thank you for so rapid reply, Loic, but my problem is a number of such frames. It may be hundreds... It would be so nice not to "talk" to each separately...
-
3. Re: Another "Fit text frame to content" issue
[Jongware] Nov 25, 2011 3:37 PM (in response to winterm)You only need to change the ones with overflows == true
http://jongware.mit.edu/idcsjs5.5/pc_TextFrame.html#overflows
-
4. Re: Another "Fit text frame to content" issue
கற்பனை (Imagine) Nov 25, 2011 11:14 PM (in response to [Jongware])Hi,
try the js code for removing the oversets through out the document.
var myTFs = app.activeDocument.textFrames.everyItem().getElements();
for (var i=0; i<myTFs.length; i++) {
myTFs[i].fit( FitOptions.FRAME_TO_CONTENT );
var gb = myTFs[i].geometricBounds;
while (myTFs[i].overflows) {
gb[3]++;
gb[2]++;
myTFs[i].geometricBounds = gb;
}
}
-
5. Re: Another "Fit text frame to content" issue
winterm Nov 26, 2011 5:53 AM (in response to [Jongware])Thank you for your time again, Jongware! I already do have bookmarked your amazing resourse... The problem is, I still lack some basics to use it efficiently. As it said in one website, "If you don't know why you need this, you shouldn't be here..."
-
6. Re: Another "Fit text frame to content" issue
winterm Nov 26, 2011 5:54 AM (in response to கற்பனை (Imagine))That's it, Imagine!
It's almost perfect... One little question: could it somehow to dig into groups?
-
7. Re: Another "Fit text frame to content" issue
[Jongware] Nov 26, 2011 7:48 AM (in response to winterm)winterm wrote:
Thank you for your time again, Jongware! I already do have bookmarked your amazing resourse... The problem is, I still lack some basics to use it efficiently.
You're welcome. What do you think is missing? I don't use the on-line version myself, I use the WinHelp (and on the Mac, Robin Lu's iChm) version so I have a Full Text Search as well. That saved my bacon a couple of times. You can download this from my web page: http://www.jongware.com/idjshelp.html
winterm wrote:
As it said in one website, "If you don't know why you need this, you shouldn't be here..."
It's just a command reference. For tutorials, you're better off with Adobe's own Beginning Scripting guide.
-
8. Re: Another "Fit text frame to content" issue
winterm Nov 26, 2011 2:54 PM (in response to [Jongware])Yes, sir! I've got that resource in my short bookmarks too... and studying it. Unfortunately, some jobs couldn't wait while I'll go all road long...
Anyway, thank you again. At least I know I'm on the right way.


