Hi Team,
I spent much time in solving this issue, but unable to find solution, so i need small help from your end.
I am using Word template and then for inserting document i am changing page orientation to Landscape.
It is causing page break before inserting text to it.
You can see below sample code and attached word template for reference.
using(MemoryStream documentStream = new MemoryStream(document))
{
ProcessingDocument = new Document(documentStream, new LoadOptions()
{
LoadFormat = LoadFormat.Docx
});
}
ProcessingDocumentBuilder = new DocumentBuilder(ProcessingDocument);
PageSetup pageSetUp = ProcessingDocumentBuilder.CurrentSection.PageSetup;
pageSetUp.Orientation = Orientation.Landscape;
// Insert text here (You can check with simple write also)
ProcessingDocumentBuilder.Writeln("text");
Please point me out where I went wrong in code.
Thanks in advance,
Regards,
Nakul