var body = DocumentApp.getActiveDocument().getBody();var p = body.getParagraphs()[0]; // This sample retrieves 1st paragraph in the body.var text = p.editAsText();var textLen = text.getText().length;for (var i = 0; i < textLen; i++) {
var textAlignment = text.getTextAlignment(i); if (textAlignment) Logger.log("%s, %s", textAlignment, text.getText()[i])}
Thanks Tanaike, worked perfectly