Skip to content

Instantly share code, notes, and snippets.

@coerv
Created October 4, 2012 21:01
Show Gist options
  • Save coerv/3836423 to your computer and use it in GitHub Desktop.
Save coerv/3836423 to your computer and use it in GitHub Desktop.
Corvins Projektwochenzeug
/*** create document ***/
var phw = 200; // variable that holds the width/height of the page
var doc = app.documents.add();
doc.documentPreferences.pageWidth = phw;
doc.documentPreferences.pageHeight = phw;
doc.documentPreferences.facingPages = false;
var page = doc.pages.item(0);
/*** create textframe ***/
var topLeft = 0 + 10; // variable that holds the xy-coordinates of the upper-left corner of the textframe
var rightBottom = phw - 10; // variable that holds the xy-coordinates of the bottom-right corner of the textframe
// create textframe
var tf = page.textFrames.add({
geometricBounds: [topLeft, topLeft, rightBottom, rightBottom],
contents: "a"
});
while(tf.overflows == false){
tf.content = "a"; // ### funzt nicht
//ptsz++;
}
/*** format text ***/
var myfont = app.fonts.item("Delicious"+"\t"+"BoldItalic");
//alert(myfont.name);
//page.textFrames.item(0).appliedFont = myfont; // ### funzt nicht
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment