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.

Thu Feb 06, 2025 4:11 pm

Hello,

I decided to give Spire.Doc for Java another try and updated an old branch to the latest version, moving from 12.1.0 to 13.1.3. As expected, I encountered some build errors, which is fine, but I can't seem to find a changelog detailing whether certain methods have been removed or replaced.

In my previous implementation, I used getOriginalFileFormat() to read the format directly from a list of InputStream. While I can replace it with FileFormat.Docx in this particular test case (since it only deals with DOCX files), it's still frustrating to lose this method.

I also used the cleanup() function, though I’m not entirely sure what it did. However, it appears to have been removed in the latest version.

I tried looking for a changelog to track the evolution of these methods, but the only one I found was under the "What's New" tab on this page, and I didn’t see any mention of breaking changes.

Additionally, I checked the API documentation, but it only shows the latest version, so I can’t access any historical records.

Can anyone help me understand what happened to these two methods? Also, is there a way to access older API documentation or a detailed changelog?

Thanks!

Relin579
 
Posts: 8
Joined: Mon Jan 15, 2024 8:57 am

Fri Feb 07, 2025 3:01 am

Hello,

Thanks for your inquiry.
The new versions have indeed upgraded some properties and methods. You can check the news of new versions in our official website (https://www.e-iceblue.com/news/spire-doc-java.html).
For the getOriginalFileFormat() method you mentioned, you can actually specify the FileFormat.Auto directly when loading the file stream, which will automatically load according to the format of the stream.
Code: Select all
doc.loadFromStream(stream,FileFormat.Auto);

For the cleanup() method, it is unclear what object you were clearing before. If it is the document object, please use dispose() directly to release resource.
Code: Select all
doc.dispose();

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1379
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.Doc