Hi,
I am inserting source into destination document. On the bottom of the destination document there was defined pilcrow glyph with specific formatting (bold + underline). I am inserting on the end of destination document, page break and than source document.
Source document starts with headline. After adding it to destination document on the very begging on that headline it was added empty space. That space has formatting same as pilcrow glyph. It is unexpected there. When doing the same in Office Word, there will not be empty space with specific formatting.
Code snippet :
public static void NK_PilcrowIssue()
{
Document destDoc = new Document(“Pilcrow01.docx”);
Document sourceDoc = new Document(“Pilcrow02.docx”);
destDoc.InsertPageBreak();
DocumentBuilder builder = new DocumentBuilder(destDoc);
builder.MoveToDocumentEnd();
builder.InsertDocument(sourceDoc, ImportFormatMode.UseDestinationStyles);
string documentName = Guid.NewGuid() + “.docx”;
destDoc.Save(documentName, SaveFormat.Docx);
}
Destination document : Pilcrow01.docx
Source document : Pilcrow02.docx
Result (not OK) document : NK_Pilcrow_ResultNotOK
Expected document : NK_Pilcrow_Expected.docx