Created
October 4, 2012 21:01
-
-
Save coerv/3836423 to your computer and use it in GitHub Desktop.
Corvins Projektwochenzeug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** 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