Copy link to clipboard
Copied
Hi All,
I have 1000+ page document and now I am forced to measure the space between the last line and bottom margin of each page.
Is there a way to do automate it by JS?
I am unable to get the last line base line postion in javascript.
Please help me get this parameter
Hi prtamil ,
if the bottom margin of the page is meant and not the bottom edge of the text frame, then do:
// text frame selected:
var frame = app.selection[0];
var gap = frame.parentPage.bounds[2] - frame.parentPage.marginPreferences.bottom - frame.lines[-1].baseline;
Regards,
Uwe
Copy link to clipboard
Copied
gap = myFrame.geometricBounds[2] - myFrame.lines[-1].baseline
Copy link to clipboard
Copied
Hi prtamil ,
if the bottom margin of the page is meant and not the bottom edge of the text frame, then do:
// text frame selected:
var frame = app.selection[0];
var gap = frame.parentPage.bounds[2] - frame.parentPage.marginPreferences.bottom - frame.lines[-1].baseline;
Regards,
Uwe