Line break in a paragraph with justify alignment not working

Hi

I have a long text with many carriage returns. Before inserting them as text in a paragraph object with Alignment=Justify, I do a replace for all carriage return with "ControlChar.LineBreak".

This works fine, except that the last line before each line break is also justified, createing very strange effects, in particular if last line contains only 2 words (one is located at the beginning of the line and the other at the end). Last line should never be justified.

How can I fix this behaviour ?

David

Try to position the DocumentBuilder to the desired paragraph and insert text with DocumentBuilder.Write method instead.