Skip to content

Line Feeds And Carrige Returns

fabiantheblind edited this page Nov 19, 2015 · 2 revisions
    /*
    author: @fabiantheblind
    This script shows the difference between line feeds and carriage returns
    or the answer to the question:
    Why is there only one paragraph in the text file I've loaded
    
    */
    
    var doc = app.documents.add();
    var page = doc.pages[0];
    var tf = page.textFrames.add({geometricBounds:[12.7,12.7,297-12.7,210-12.7]});
    app.textPreferences.showInvisibles = true;
    tf.contents = "This is a Linefeed\nThis is a CarrigeReturn\r";
Clone this wiki locally