Latest release (February 2024)

Full list of changes in this release

KeySummaryCategory
VIEWERNET-4185Add Unix CPIO Archive (.CPIO) file-format supportFeature
VIEWERNET-4183Add Design Web Format XPS File (.dwfx) file-format supportFeature
VIEWERNET-3520Autodetect of the text file encodingFeature
VIEWERNET-4211Optimize (compress) PDF file when exporting Excel SpreadsheetsFeature
VIEWERNET-4180Add Autodesk FBX Interchange File (.FBX) file-format supportFeature
VIEWERNET-4283Add Amazon AZW3/KF8 ebook (.azw3) file-format supportFeature
VIEWERNET-4272Highlight search text in file previewFeature
VIEWERNET-4212Support for setting margins when exporting Excel Spreadsheets to PDFFeature
VIEWERNET-4312[GroupDocs.Viewer.UI] Option to disable printFeature
VIEWERNET-4280[GroupDocs.Viewer.UI] Check if license file exists in the application folderFeature
VIEWERJAVA-3318Make it possible to accept string values instead of “Color” for methods setColor and setBackgroundColorFeature
VIEWERJAVA-3319Make it possible to accept an integer values instead of “TimeZone” for method setTimeZoneOffsetFeature
VIEWERJAVA-3208Improved performance when rendering DWF documentEnhancement
VIEWERJAVA-3212Improved performance when viewing specific DWF document as HTMLEnhancement
VIEWERNET-2918Out of memory with CGMFix
VIEWERNET-3988Unexpected font parsing exceptionFix
VIEWERNET-4090Out of memory exception when rendering PDF on LinuxFix
VIEWERNET-4089PDF is displayed in black on LinuxFix
VIEWERNET-3979GroupDocs under Linux environment crashes with a PDF fileFix
VIEWERNET-4213Viewer is not rendering all pages on Azure deployment and local inconsistentlyFix
VIEWERNET-4061Can’t view ICO fileFix
VIEWERNET-3802“Could not load file. File is corrupted or damaged.” exception when rendering ODT fileFix
VIEWERNET-3160Image missing in rendered page in LinuxFix
VIEWERNET-3283Out of memory exception when rendering PDF file in DockerFix
VIEWERNET-3222Out of memory exception when rendering PDF file on LinuxFix
VIEWERNET-3800“Could not load file. File is corrupted or damaged.” exception when rendering ODT fileFix
VIEWERNET-4214Options is not OdRasterizationOptions when exporting ODG to HTMLFix
VIEWERNET-4208MBOX rendered without imagesFix
VIEWERNET-4181Autodesk FBX Interchange File (.FBX) not working with ASCII formatFix
VIEWERNET-2646The image was cut when rendering from PDF with images in LinuxFix
VIEWERNET-2823Invalid image block lengthFix
VIEWERNET-3015Mobi file detected as damagedFix
VIEWERNET-4152Operation is not valid due to the current state of the object when rendering Excel spreadsheet to PNGFix
VIEWERNET-4243Slow Load time in ViewerFix
VIEWERNET-4246Object reference not set to an instance of an object? error occurs when converting this excel fileFix
VIEWERNET-4250Font not embedded when converting DOCX to HTMLFix
VIEWERNET-4260The type initializer for ‘Gdip’ threw an exception when rendering PDFFix
VIEWERNET-4263Object reference not set to an instance of an object exception when rendering DOCX fileFix
VIEWERNET-4266Converting STL files to HTML produces empty fileFix
VIEWERNET-4324Links are covered after renderingFix
VIEWERNET-4322AI file can’t be openedFix
VIEWERNET-4318PPTX showing headers when ExcludeFontsFix
VIEWERNET-4319Viewer fails to open DIB fileFix
VIEWERNET-4328OneNote embedded drawing is missingFix
VIEWERJAVA-3109Viewer converts DXF document to empty HTML fileFix
VIEWERJAVA-3186Failed rendering DWFX document as PDFFix
VIEWERJAVA-3096Failed rendering DWFX document as JPGFix
VIEWERJAVA-3122Failed rendering DWFX document as PNGFix
VIEWERJAVA-3109Viewer converts DXF document to empty HTML fileFix
VIEWERJAVA-3121Error when rendering DWF document as HTML with embedded resourcesFix
VIEWERJAVA-3127An image is wrong when rendering specific PDF fileFix
VIEWERJAVA-3136NullPointerException is thrown when loading specific DWG documentFix
VIEWERJAVA-3144Exception is thrown when try to view DGN document as HTML with SVG insideFix

Major Features

This release includes next features and enhancement:

Public API and backward incompatible changes

Added support for Unix CPIO archives

CPIO is archive file. This archive format is used by RPM, the Linux kernel initramfs, and Apple’s pax archive installer.

/**
 * Cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems.
 * Learn more about this file format <a href="https://wiki.fileformat.com/compression/cpio">here</a>.
 */
CPIO("Unix CPIO Archive", ".cpio")

Added support for Design Web Format XPS (.dwfx) File

DWFX is secure file format developed by Autodesk to combine and publish rich 2D- and 3D-design data.

/**
 * <p>
 * Represents a Design Web Format File XPS (.dwfx), which is a compressed format for viewing, reviewing, or printing 2D/3D drawings as an XPS document. It contains graphics and text as part of the design data and reduces the file size due to compression.
 * Learn more about this file format <a href="https://wiki.fileformat.com/cad/dwfx">here</a>.
 * </p>
 */
DWFX("Design Web Format File XPS", ".dwfx")

Autodetect of the text file encoding

GroupDocs.Viewer can automatically detect text (TXT, CSV, TSV) files charset. When Viewer fails to detect a file encoding it falls back to the default encoding specified in LoadOptions#getCharset().

To enable encoding autodetect set LoadOptions#setDetectCharset(boolean) property to true.

LoadOptions loadOptions = new LoadOptions();
loadOptions.setDetectCharset(true);

try (Viewer viewer = new Viewer("employees.csv", loadOptions)) {
    // Convert the spreadsheet to HTML.
    // {0} is replaced with the current page number in the file names.
    HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources("page_{0}.html");
    viewer.view(viewOptions);
}

In addition you can use two new methods of the FileType class to detect charset of your text files.

// Detect encoding from a file path
Charset charset1 = FileType.detectCharset("employees.csv");

// Detect encoding from a stream
InputStream stream = Files.newInputStream(Paths.get("employees.csv"));
Charset charset2 = FileType.detectCharset(stream);

Added support for Autodesk FBX Interchange File

FBX file is a format used to exchange 3D geometry and animation data. FBX files are used in film, game, and Augmented Reality and Virtual Reality (AR/VR) development.

    /**
 * <p>
 * Represents an Autodesk FBX Interchange File (FilmBoX) (.fbx), which is a 3D model format.
 * Learn more about this file format <a href="https://wiki.fileformat.com/cad/fbx">here</a>.
 * </p>
 */
FBX("Autodesk FBX Interchange File (FilmBoX)", ".fbx")

Optimize (compress) PDF file when exporting Excel Spreadsheets

You can optimize output PDF file size when exporting spreadsheets. Optimized PDF document won’t contain common fonts like Times New Roman and Arial. Grid lines is also optimized to reduce output file size. Depending on the content of the input spreadsheet the output PDF size can be reduced up to 40%. To optimize the output PDF set PdfViewOptions#setOptimize(boolean) property to true.

try (Viewer viewer = new Viewer("employees.xlsx")) {
    PdfViewOptions viewOptions = new PdfViewOptions();
    viewOptions.setOptimize(true);

    viewer.view(viewOptions);
}

The following image shows the properties of two PDF files where the left one is not optimized and has a size of 11.2 MB and the right one is 6.6 MB.

Not optimized and optimized PDF files comparison

Added support for Amazon AZW3 ebook

AZW3 is ebook file. This ebook format is used by Amazon Kindle, this file format is developed for Amazon Kindle devices. The format is an enhancement to older AZW files and is used on Kindle Fire devices only with backward compatibility for the ancestor file format i.e. MOBI and AZW.

/**
 * <p>
 * Amazon Kindle Format 8 (KF8) ebook is the digital file format developed for Amazon Kindle devices. The format is an enhancement to older AZW files and is used on Kindle Fire devices only with backward compatibility for the ancestor file format i.e. MOBI and AZW.
 * Learn more about this file format <a href="https://wiki.fileformat.com/ebook/azw3">here</a>.
 * </p>
 */
AZW_3("Amazon Kindle Format 8 (KF8) eBook", ".azw3")

Support for setting margins when exporting Excel Spreadsheets to PDF

If convert from Excel workbook to the Pdf now optional margins can be applied to the output pages. If margin value is less than 0 or not set then it will be set to the default value.

try (Viewer viewer = new Viewer("invoice.xlsx")) {
    PdfViewOptions viewOptions = new PdfViewOptions();

    // Set margins for worksheets in the output pdf pages
    viewOptions.getSpreadsheetOptions().setLeftMargin(0);
    viewOptions.getSpreadsheetOptions().setRightMargin(0.5);
    viewOptions.getSpreadsheetOptions().setTopMargin(1);
    viewOptions.getSpreadsheetOptions().setBottomMargin(-10); // set to default value

    viewer.view(viewOptions);
}

Option to disable print

GroupDocs.Viewer.UI Print button now can be disabled optionally from backend.

/// Implement the service
.setupGroupDocsViewer((viewerConfig, config) -> {
    ...
    config.disablePrint();
    ...
})

Check if license file exists in the application folder

GroupDocs.Viewer.UI Check of license file in the application folder added.

Current sequence of checks:

  • check license file path from config
  • check path from GROUPDOCS_LIC_PATH environment variable
  • check app root folder for files with file names
    • GroupDocs.Viewer.lic
    • GroupDocs.Viewer.Product.Family.lic