{{ figure align=center src=“images/aspose_imaging-for-java.jpg” alt="" }}
We are pleased to announce September’s release of Aspose.Imaging for Java. This release adds long‑awaited support for the DjVu file format. See the release notes of Aspose.Imaging for Java 3.0.0 for a full list of bug fixes, improvements, and sample code for new features. If you plan to upgrade, review the Public API Change section to understand what has changed since your current version.
While you download the latest build, here are a few highlighted features.
Convert DjVu Files using Java
DjVu is gaining popularity as a lightweight alternative to PDF. It offers smaller file sizes and can replace PDF for digital documents, TIFF for scanned bitonal files, JPEG/JPEG2000 for photos, and GIF for large paletted images.
Aspose.Imaging for Java 3.0.0 now supports loading DjVu files for conversion to raster image formats and PDF. The new DjvuImage class and related helpers are listed in the Public API Changes in Aspose.Imaging for Java 3.0.0.
Convert DjVu to Multi-Frame Raster Formats using Java
Like PDF and TIFF, DjVu files can contain multiple pages. When converting DjVu to raster formats such as TIFF or GIF, all pages are rendered by default. The code below shows how to convert all pages of DjVu to TIFF.
{{ gist aspose-imaging 8c9bd83e0d07145ba0c1 “Examples-src-main-java-com-aspose-imaging-examples-djvu-ConvertDjvuToTiff-ConvertDjvuToTiff.java” }}
Convert DjVu to PDF Format using Java
Aspose.Imaging for Java 3.0.0 can also convert DjVu files to PDF using the existing PdfOptions class. You can export all DjVu pages or a selected subset.
The snippet below demonstrates converting a subset of DjVu pages to PDF.
{{ gist aspose-imaging 8c9bd83e0d07145ba0c1 “Examples-src-main-java-com-aspose-imaging-examples-djvu-ConvertDjvuToPdf-ConvertDjvuToPdf.java” }}
Convert Specific DjVu Pages to Multi-Frame Raster Images
The new IntRange class lets you specify a page range for conversion. Pass an IntRange instance to DjvuMultiPageOptions to render selected DjVu pages to TIFF or GIF.
{{ gist aspose-imaging 8c9bd83e0d07145ba0c1 “Examples-src-main-java-com-aspose-imaging-examples-djvu-ConvertRangeOfDjVuPages-ConvertRangeOfDjVuPages.java” }}
Convert Specific Portion of DjVu Page to Image using Java
Another overload of DjvuMultiPageOptions accepts a Rectangle to export a defined area of a DjVu page. The example below creates a Rectangle and saves the selected portion as PNG.
{{ gist aspose-imaging 8c9bd83e0d07145ba0c1 “Examples-src-main-java-com-aspose-imaging-examples-djvu-ConvertSpecificPortionOfDjVuPage-ConvertSpecificPortionOfDjVuPage.java” }}
We appreciate your feedback. If you have comments about this release, please visit the Aspose.Imaging forum for a discussion.