attr = new RtfAttributes ();
attr.set(RtfText.ALIGN_LEFT);
p = sect.newParagraph (attr);
p.newLineBreak();
p.newText ("This is the left aligned text.");
p.newLineBreak();
p.close();
attr = new RtfAttributes ();
attr.set(RtfText.ALIGN_RIGHT);
p = sect.newParagraph (attr);