Latest release (April 2024)

Full list of changes in this release

KeySummaryCategory
VIEWERNET‑4330Support PDF file optimizationsFeature
VIEWERNET‑4249Support retrieving view info when rendering to PDFFeature
VIEWERJAVA‑3078Support retrieving view info when rendering to PDFFeature
VIEWERNET‑3562Converting particular PDF to HTML is throwing an exceptionFix
VIEWERNET‑4356High memory usage, long processing time creating thumbnail for spreadsheetFix
VIEWERNET‑4311NullReferenceException when trying to view a PST file as PDFFix
VIEWERNET‑4323DOCX to PNG: Application consumes all available memoryFix
VIEWERNET‑4248Aspose.PDF dependency creates temp filesFix
VIEWERNET‑2428Incorrect position of images and characters in a docx fileFix
VIEWERNET‑4120setLicense is not working with renewed licenseFix
VIEWERNET‑4385PDF file loading slowFix
VIEWERNET‑4358A workbook must contain at least a visible worksheetFix
VIEWERNET‑4023Presentation Text with 3D effect incorrectly rendered on LinuxFix
VIEWERNET‑4138Empty <title> tags being created when loading PDF and EPub documentsFix
VIEWERNET‑4236Exception thrown when converting certain PPTX to HTMLFix
VIEWERNET‑4414Error while opening .psd fileFix
VIEWERNET‑4245Whole PDF is rendered as a single linkFix
VIEWERNET‑4419Unable to detect password protected 7z archiveFix
VIEWERNET‑4421GroupDocs Viewer is throwing Exception “The type initializer for ’ threw an exception.”Fix
VIEWERNET‑4420Three pages instead of two when rendering DOCX file on LinuxFix
VIEWERNET‑2870“The number greater than zero is expected. (Parameter ‘width’)” exception when rendering DWF fileFix
VIEWERNET‑3692“Could not load file. File is corrupted or damaged.” exception when rendering ODS fileFix
VIEWERNET‑3792Cannot view EPS - The given key ‘Wingdings’ was not present in the dictionary.Fix
VIEWERNET‑3999Slow conversion of certain PDF to HTMLFix

Major Features

This release includes next features and enhancement:

Public API and backward incompatible changes

Support PDF file optimizations

This feature allows you to optimize the output PDF file for a web browser or to reduce the file size using various options.

You can also optimize an existing PDF file. To do this, open it and save the resulting file, specifying the optimization parameters.

For details, see Optimize the output PDF file.

The following code snippet shows how to enable all available optimizations.

try (Viewer viewer = new Viewer("invoice.pdf")) {
    PdfViewOptions viewOptions = new PdfViewOptions();
    PdfOptimizationOptions optimizationOptions = new PdfOptimizationOptions();
    optimizationOptions.setLinearize(true); // Optimize PDF for web-browsers
    optimizationOptions.setOptimizeSpreadsheets(true); // Optimize spreadsheets for a smaller size
    optimizationOptions.setSubsetFonts(true); // Keep the characters that actually used
    optimizationOptions.setRemoveAnnotations(true); // Remove annotations
    optimizationOptions.setRemoveFormFields(true); // Remove form fields
    optimizationOptions.setConvertToGrayScale(true); // Convert images to grayscale
    optimizationOptions.setCompressImages(true); // Enable images compression
    optimizationOptions.setResizeImages(true); // Enable resize images with lower resolution
    optimizationOptions.setMaxResolution(150); // Set resolution for images, default value is 300
    optimizationOptions.setImageQuality(30); // Set image quality, default value is 100

    viewOptions.setPdfOptimizationOptions(optimizationOptions);
    viewer.view(viewOptions);
}

Support retrieving view info when rendering to PDF

To get information about output PDF file, call the getViewInfo method.

For details, see Get the PDF output file information.

The following code snippet shows how to get information about the output PDF file.

try (Viewer viewer = new Viewer("resume.docx")) {
    ViewInfoOptions viewInfoOptions = ViewInfoOptions.forPdfView();
    ViewInfo viewInfo = viewer.getViewInfo(viewInfoOptions);
    
    //Get number of pages and pages size
}

Deprecated API

The following public API is now deprecated and will be removed in the future versions.

PdfViewOptions#setJpgQuality(int)

Please use the new API to set image quality when rendering to PDF.

try (Viewer viewer = new Viewer("invoice.pdf")) {
    PdfViewOptions viewOptions = new PdfViewOptions();
    final PdfOptimizationOptions optimizationOptions = new PdfOptimizationOptions();
    optimizationOptions.setCompressImages(true);
    optimizationOptions.setImageQuality(30); // Default value is 100
    viewOptions.setPdfOptimizationOptions(optimizationOptions);

    viewer.view(viewOptions);
}

PdfViewOptions#setOptimize(boolean)

Please use the new API to optimize Excel spreadsheets when rendering to PDF.

try (Viewer viewer = new Viewer("inventory.xlsx")) {
    PdfViewOptions viewOptions = new PdfViewOptions();
    final PdfOptimizationOptions optimizationOptions = new PdfOptimizationOptions();
    optimizationOptions.setOptimizeSpreadsheets(true); // Optimize Excel spreadsheets border lines and fonts
    viewOptions.setPdfOptimizationOptions(optimizationOptions);

    viewer.view(viewOptions);
}