Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sat Apr 04, 2015 6:42 pm

When i am cloning the table from one document to another document, It is table styles are not same as in the document.
Code: Select all
var doc = new Document();
            doc.LoadFromFile(@"D:/test.doc", FileFormat.Auto);
            var document = new Document();
            document.LoadFromFile(@"D:/test2.docx", FileFormat.Docx2013);
            document.Sections[0].PageSetup.Orientation = PageOrientation.Landscape;
           
            var firstItem = doc.Sections[0].Body.ChildObjects.FirstItem as IDocumentObject;

            while (firstItem != null)
            { 
                document.Sections[0].Body.ChildObjects.Add(firstItem.Clone());
                firstItem = firstItem.NextSibling;
            }
            document.SaveToFile(@"D:/Test1.doc", FileFormat.Doc);


vishnupasuleti1234@gmail.com
 
Posts: 4
Joined: Thu Apr 02, 2015 2:02 pm

Mon Apr 06, 2015 9:11 am

Hello,

Thanks for your inquiry. I have noticed the issue you mentioned and transferred it to our Dev team, once there are any update, we will let you know.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Apr 20, 2015 8:28 am

Hello,

I'm regret to share you that the issue can't be repaired, the reason is that if the font style of the original document is set to automatic, when it is merged to target document, it will be based on target document font style, so it is black same as the cell color, so you can't see the font.
Please contact us if you have any questions.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.Doc