Skip to content

mlove4u/JsPrototype4AdobeESTK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Prototype to Adobe ESTK

About:

Add some prototype to Adobe ESTK (ES3).

  • String.prototype.format
  • String.prototype.trim
  • Array.prototype.map
  • Array.prototype.indexOf
  • Array.prototype.filter

Usage:

#include "JsPrototype4AdobeESTK.jsx"

Sample: (Array.prototype.filter)

// InDesign
//get all textFrames in document
var objs = app.activeDocument.allPageItems;
var tfs = objs.filter(
    function (x) {
        return x instanceof TextFrame
    });
// get all textFrames which width >20mm
var largeTfs = tfs.filter(
    function (x) {
        var bounds = x.geometricBounds;
        var width = bounds[3] - bounds[1];
        return width > 20;
    });

About

JsPrototype for AdobeESTK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published