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.

Wed Apr 10, 2024 7:16 am

Hello,

I am not sure if I have got the problem right:

I have two files. File one has only \deff0 tag followed by font definitions. This file cannot be loaded by Document (parsed text contains only "/r/n", nothing else). Second file has \deff0 tag followed by \themelangcs0 and this file gets loaded properly. It works similar on both of the engines (old and new)

Is it something that can be fixed by setting up something, without editing the source file? Both files are attached.

Thanks,

Jan

jan.zanda
 
Posts: 16
Joined: Wed Mar 06, 2024 11:30 am

Wed Apr 10, 2024 9:07 am

Hi,

Thanks for your inquiry.
I tested the file(not_ok.rtf) with the latest version Spire.Doc 12.4.1, there are no issue when using document.loadFromFile method. are you using the latest version to test, if not, please update and test again.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Apr 11, 2024 7:58 am

I am sorry, I accidentally added wrong version as not_ok.rtf. It seems the problem is not the deff0 tag, but \fromhtml1

new file attached. I use the latest spire doc.

I apologize for the confusion.

Jan

jan.zanda
 
Posts: 16
Joined: Wed Mar 06, 2024 11:30 am

Thu Apr 11, 2024 8:45 am

Hi,

It doesn’t matter. I test the new file with the following code, no exception is thrown. Is your test code the same as mine? But the content of the result Rtf file(result_not_ok.rtf) disappear, is this your issue?

Code: Select all
 Document document = new Document();
        document.loadFromFile("data/not_ok.rtf");

        document.saveToFile("output/result_not_ok.rtf", FileFormat.Rtf);


Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Apr 11, 2024 10:44 am

Exactly, no exception, but also no content. That is the issue.

jan.zanda
 
Posts: 16
Joined: Wed Mar 06, 2024 11:30 am

Fri Apr 12, 2024 2:07 am

Hi,

Thanks for your feedback.
I have logged it into our bug track system with the ticket number SPIREDOC-10444, once it is resolved, I'll inform you in time. Sorry for the inconvenience caused.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Jul 11, 2024 9:07 am

Hi,

Thanks for your patience!
Glad to inform you that we just released Spire.Doc.Java.12.7.6 which fixes the issue with SPIREDOC-10444.
Please download the new version from the following links to test.
Website download link: https://www.e-iceblue.com/Download/doc-for-java.html

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.Doc