We are pleased to announce the release of GroupDocs.Viewer for Java 17.5.1. This is a hotfix release that contains 2 bug fixes and a new feature. The latest version allows you to manually cleanup the temporary files that are created during document rendering. Please continue to read the details about the new feature and the bug fixes.
Cleanup Temporary Files
While rendering documents, GroupDocs.Viewer creates temporary files which were removed automatically after each operation. As removing temporary files is a time-consuming operation, therefore, a new method clearTempFiles is introduced. This method is thread-safe and can be called any time so it won’t affect documents’ rendering. GroupDocs.Viewer uses default system’s temporary folder to store temp files and it can be changed by setting temporary directory in process properties e.g. System.setProperty(“java.io.tmpdir”, “c:/my_temp_files/”). The following code sample shows how to cleanup temporary files.
// Setup GroupDocs.Viewer config ViewerConfig config = new ViewerConfig(); config.setStoragePath(STORAGE_PATH); // Create image or html handler ViewerImageHandler handler = new ViewerImageHandler(config); // Cleanup temporary files handler.clearTempFiles();
Following bugs have been fixed in this hotfix release:
- NullPointerException when rendering PDF as HTML
- Performance degradation during consequent iterations through the same documents
Related Links and Resources
Following resources will help you to download, learn, try and get technical support.
- Product Home – API Home Page
- Installation – Install GroupDocs.Viewer from Maven
- Documentation – Product Documentation
- Product Support Forum – Technical Support Forum for GroupDocs.Viewer
- Examples – Source Code Examples
- Sample Front End App – Open Source Document Viewer Application
As always, you are welcome to share your feedback to improve this product. We will be happy to know your thoughts. Just create a forum thread and our dedicated support team will be there to respond.