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.

Tue Jun 23, 2020 8:28 am

Hi

I have this code (simplified):

Code: Select all
Document document = new Document();
document.LoadFromFile("test.dotx", FileFormat.Dotx);
Console.WriteLine(document.Styles.FindByName(BuiltinStyle.Normal.ToString()).CharacterFormat.FontSize); //Result = 11

document.InsertTextFromFile("test2.docx", FileFormat.Docx);
Console.WriteLine(document.Styles.FindByName(BuiltinStyle.Normal.ToString()).CharacterFormat.FontSize); //Result = 14


After "InsertTextFromFile" the FontSize of the builtin Style "Normal" changed to 14. I cannot figure out why. It is not defined in either test.dotx or test2.docx.

What is the problem here?

Thanks and best regards

storztools
 
Posts: 5
Joined: Fri Aug 04, 2017 11:42 am

Tue Jun 23, 2020 9:01 am

Hello,

Thanks for your inquiry.
I simulated two Word files and then tested your scenario with the latest Spire.Doc Pack(hot fix) Version:8.6.3 but didn't reproduce your issue. To help us investigate further, please share your input files with us. You could upload them here or send them to us(support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Jul 15, 2020 11:22 am

Hello,

Greetings from E-iceblue!
How is your issue now? Any feedback will be greatly appreciated!

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.Doc