Article View: adobe.scripting.indesign
Article #1649Re: Detecting Permanent Overset
From: Harbs
Date: Sun, 01 Feb 2009 20:20
Date: Sun, 01 Feb 2009 20:20
35 lines
1858 bytes
1858 bytes
Dave_Saunders@adobeforums.com wrote:
> You are clearly much more into footnotes than I've ever been!
>
Probably, but I could say the same thing regarding you and tables! ;)
Here's the basic idea for getting empty frames (as you can see, my
functions all rely upon each other):
function IsEmptyTextFrame(textFrame){
if(textFrame.characters.length>0){return false}
if(HasTables (textFrame)){return false}
if(HasFootnotes (textFrame)){return false}
return true;
}
function HasFootnotes(textFrame){
if(textFrame.footnotes.length>0){return true}
var footnote = GetLastPlacedFootnote(textFrame.parentStory);
if(! footnote){return false}
var footnoteFrames = AsArray(footnote.parentTextFrames);
if(GetItemIndex(footnoteFrames,textFrame)!=null){return true}
return false;
}
//**********************************
function HasTables(textFrame){
if(textFrame.tables.length>0){return true}
if(textFrame.lines.length==0){return false}
if(textFrame.lines[0].characters.length==0){return true}
return false;
}
--
Harbs
http://www.in-tools.com
Technical Details
Message-ID:
<D821BE6D5FEA7E513237496C5D210E89@in.webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b7bfd9.-1@webcrossing.la2eafNXanI> <59b7bfd9.3@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,eed2f709e19dc3b7 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Harbs Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Detecting Permanent Overset Message-ID: <D821BE6D5FEA7E513237496C5D210E89@in.webcrossing.la2eafNXanI> Date: Sun, 1 Feb 2009 12:20:42 -0800 References: <59b7bfd9.-1@webcrossing.la2eafNXanI> <59b7bfd9.3@webcrossing.la2eafNXanI> Lines: 36 User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit