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 Mar 06, 2024 12:15 pm

Hello,

I am unable to correctly open ODT file in Java Spire.Doc and convert them to PDF.

When I load it via
Code: Select all
doc.loadFromStream(file, FileFormat.Auto);
it fails on
Code: Select all
Caused by: class com.spire.doc.packages.spriuo: Error loading file: Unsupported file format
Parameter name: input


It behaves the same if I specify format on input (FileFormat.Odt).

If I load it via
Code: Select all
 doc.loadFromFile(odtFile.getAbsolutePath());


it processes first page and then writes this (not fail, just log, but only first page is returned)

Code: Select all
java.lang.Exception: File format Cannot be recognized.
   at com.spire.doc.Document.spr⅓┐—(Unknown Source)
   at com.spire.doc.Document.loadFromFile(Unknown Source)


Test file attached.

Thanks a lot,

Jan.

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

Thu Mar 07, 2024 3:08 am

Hello,

Thank you for your inquiry.
I tested the Odt document you provided using the latest version of Spire.Doc (Spire.Doc for Java Version:12.2.2) and did reproduce the issue you mentioned. I have logged the issue into our bug tracking system with the ticket number SPIREDOC-10364. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1651
Joined: Wed Apr 07, 2021 2:50 am

Fri Apr 19, 2024 9:43 am

Hello,

Thanks for your patience!
Glad to inform you that we just released Spire.Doc for Java Version:12.4.6, which fixes the issue of SPIREDOC-10364.
Welcome to test it.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1651
Joined: Wed Apr 07, 2021 2:50 am

Mon Apr 22, 2024 11:35 am

Thanks, looks like it is working :-)

Jan

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

Tue Apr 23, 2024 9:20 am

Hello,

Glad to hear that.
If there is anything else we can do for you in the future, just feel free to contact us!
Have a nice day.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1651
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc

cron