Skip to content

Commit

Permalink
added the fit script
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiantheblind committed May 15, 2013
1 parent e49ba5f commit 1873d8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fit_to_margin.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(function marginfitting(thisObj){ var sel = app.activeDocument.selection; if(sel.length < 1) { alert("no selection"); return; } var page = sel[0].parentPage; var margPrefs = page.marginPreferences; var columns = margPrefs.columnsPositions;//~ alert( columns[1] + margPrefs.left - columns[0]); var mwidth = columns[1] - columns[0] ;// 62.333 ; fit_to_margins (sel,mwidth); function fit_to_margins(sel,newwidth){ for(var i =0;i < sel.length;i++){ var curbnds = sel[i].geometricBounds; sel[i].geometricBounds = [curbnds[0],curbnds[1],curbnds[2], curbnds[1] + newwidth]; } } })(this);
Expand Down

0 comments on commit 1873d8a

Please sign in to comment.