I'm Newbies using Spire.Doc for .NET. Still under evaluation
I want to Combine 2 Document into Single Document. My files as follow,
1- Nota_3_Universiti.doc ( 9 Pages )
2- Nota_4_Universiti.doc ( 1 Page )
*See attachment - docs.zip
After Merged using below code
- Code: Select all
//Load Document1 and Document2
Document DocOne = new Document();
DocOne.LoadFromFile(@"C:\myDevelopment\SPKU_Dev - 28.03.2016 - 1\trnxFolder\Nota_3_Universiti.doc", FileFormat.Doc);
Document DocTwo = new Document();
DocTwo.LoadFromFile(@"C:\myDevelopment\SPKU_Dev - 28.03.2016 - 1\trnxFolder\Nota_4_Universiti.doc", FileFormat.Doc);
//Merge
foreach (Spire.Doc.Section sec in DocTwo.Sections)
{
DocOne.Sections.Add(sec.Clone());
}
//Save
DocOne.SaveToFile(Server.MapPath("trnxFolder//Merge.doc"), FileFormat.Doc);
My Output Document as followed. Why only 2 Pages? Looks like Nota_3_Universiti.doc ( 9 Pages ) only appear in 1 Page
Please help