If you can the page setup margins on a document, the paragraph alignment is changed.
Below is the code that can reproduce the issue (Assert is from NUnit):
public void CreateDoc(string filename)
{
DocumentBuilder docBuilder = new DocumentBuilder();
docBuilder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
docBuilder.Writeln("Hello World");
docBuilder.Document.Save(filename);
}
public void Test(string filename)
{
Document doc = new Document(filename);
doc.Sections[0].PageSetup.LeftMargin = 0.5;
doc.Sections[0].PageSetup.RightMargin = 0.5;
Assert.AreEqual(ParagraphAlignment.Center, doc.Sections[0].Body.Paragraphs[0].ParagraphFormat.Alignment);
}
public void Test()
{
CreateDoc("test.doc");
Test("test.doc");
}