GroupDocs.Viewer for Java 21.11 Release Notes

Major Features

There are lots of features, improvements, and bug-fixes in this release, most notable are:

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
VIEWERNET-2393Add Lotus Notes Database (.nsf) file-format supportFeature
VIEWERNET-2607Add Compressed SVG File (.svgz) file-format supportFeature
VIEWERNET-2472"File is corrupted or damaged” exception is thrown when rendering DXF fileBug
VIEWERNET-2499"A generic error occurred in GDI+” exception occurs when rendering DOCX fileBug
VIEWERNET-2506"Image export failed” exception when rendering ODG fileBug
VIEWERNET-2507"Image export failed” when rendering JP2 fileBug
VIEWERNET-2536"Input string was not in a correct format” exception when rendering VSDXBug
VIEWERNET-2539Exception is thrown when rendering PPTX fileBug
VIEWERNET-2584"File is corrupted or damaged” exception is thrown when rendring DOCX fileBug
VIEWERNET-2585"Parameter is not valid” exception when rendering DOCX fileBug
VIEWERNET-2586"File is corrupted or damaged” exception when rendering WMF fileBug
VIEWERNET-2588"Unable to cast object of type” exception when rendering PPTX fileBug
VIEWERNET-2594"Zoom value should be between 10 and 400” exception when rendering ODS fileBug
VIEWERNET-2602NullPointerException when rendering a certain PDF to HTMLBug
VIEWERNET-2633Particular HTML file to PDF rendering issueBug
VIEWERNET-2643Overflow error on VDX fileBug
VIEWERNET-2656Can’t open xlsm fileBug
VIEWERNET-2662The column index should not be inside the pivottable reportBug
VIEWERNET-2663getViewInfo method is stuckBug
VIEWERNET-2694When watermark is added output HTML doesn’t end properlyBug
VIEWERNET-2704Document wrongly marked as encrypted.Bug
VIEWERNET-2033Add Adobe Photoshop Large Document Format (.psb) file format supportFeature
VIEWERNET-2547Add feature to render only figures without scheme for Visio filesFeature
VIEWERNET-2548VSS figures are rendered with small sizeBug
VIEWERNET-2690PDF when rendered to HTML doesn’t show drawingBug
VIEWERNET-2706VDW, VSS, VST rendering to IMAGE/HTML works incorrectlyBug
VIEWERNET-2707Row number or column number cannot be zeroBug
VIEWERNET-2710Object reference not set to an instance of an object exception thrown when rendering DNG fileBug
VIEWERNET-2721Wrong error message for not supported dgn versionBug
VIEWERNET-2744Specified argument was out of the range of valid valuesBug
VIEWERNET-2746–°ontent breaks on 5 page when converting to PDFBug
VIEWERNET-2422Add logging supportFeature
VIEWERNET-2605Add Compressed Windows Metafile (.wmz) file-format supportFeature
VIEWERNET-2606Add Windows Compressed Enhanced Metafile (.emz) file-format supportFeature
VIEWERNET-2747More descriptive exception when opening encrypted XLSM filesFeature
VIEWERNET-2749Add Corel Metafile exchange (.cmx) file-format supportFeature
VIEWERNET-2759Add Corel Draw (.cdr) file-format supportFeature
VIEWERNET-2769Support rendering presentations with shapes and text with 3D effectsFeature
VIEWERNET-1080Incorrect print preview and print of output HTML in ChromeBug
VIEWERNET-2426Problem with summary when rendering a PDF to HTMLBug
VIEWERNET-2477Exception is thrown when loading XLSB fileBug
VIEWERNET-2488Exception is thrown when rendering DNG fileBug
VIEWERNET-2489"Image export failed” exception when rendering TIFF fileBug
VIEWERNET-2495"A generic error occurred in GDI+” exception occurs when rendering VSDX fileBug
VIEWERNET-2550"A generic error occurred in GDI+” exception occurs when rendering MPP fileBug
VIEWERNET-2603XLSX to HTML rendering missing some fieldsBug
VIEWERNET-2609Can’t get document info for JPFBug
VIEWERNET-2660Out of memory exception thrown on Linux when rendering MPP to PNGBug
VIEWERNET-2661"A generic error occurred in GDI+” exception occurs when rendering VSDX file to PNG in LinuxBug
VIEWERNET-2751You can not change part of an array or table formula.Bug
VIEWERNET-2765Out of memory when opening VSDXBug
VIEWERNET-2771Could not load file. File is corrupted or damaged.Bug
VIEWERNET-2772'Object reference not set to an instance of an object.’ when saving VSS shapes for specific fileBug
VIEWERNET-2777Image saving failed exception when saving SVGBug
VIEWERNET-2779PLT file is failed to openBug
VIEWERNET-2780Empty XLSX cells not rendered when converting to PNGBug
VIEWERNET-2781An exception should be not thrown when the font doesn’t existBug
VIEWERNET-2783You can not change part of an array or table formula.Bug
VIEWERNET-2784Object reference not set to an instance of an object.Bug
VIEWERNET-2787The column index should not be inside the pivottable reportBug
VIEWERNET-2792ViewOptions ignored for Cells fileBug
VIEWERNET-2839Update CAD document size only when it needsImprovement
VIEWERNET-2826Make detailed description for unsupported numbers fileImprovement
VIEWERNET-2598Rendering archives in HTML with Windows explorer behaviorImprovement
VIEWERNET-2907Stream does not support reading exception when rendering MPP/MPX/MPT files to JPG/PNGBug
VIEWERNET-2880Rendering NSF to JPG/PNG/PDF takes too much timeBug
VIEWERNET-2879Images are missing, text positioning wrong when rendering Excel as HTML/image/PDF in LinuxBug
VIEWERNET-2877File is damaged exception when rendering BMP fileBug
VIEWERNET-2873Replacing the default font doesn’t work on LinuxBug
VIEWERNET-2872"Key cannot be null. (Parameter ‘key’)” exception when rendering ODS fileBug
VIEWERNET-2850"Object reference not set to an instance of an object” when rendering specific XLTX fileBug
VIEWERNET-2844Wrong exceptionBug
VIEWERNET-2842"Key cannot be null. (Parameter ‘key’)” exception when rendering ODS fileBug
VIEWERNET-2831"Input string was not in a correct format.” exception when rendering XLSX fileBug
VIEWERNET-2817Parameter is not valid.Bug
VIEWERNET-2813An attempt was made to move the file pointer before the beginning of the file.Bug
VIEWERNET-2788Shape with 3-D effect has incorrect background colorBug
VIEWERNET-2776Out of memory exception thrown Linux when rendering specific VSD file to PNG in LinuxBug
VIEWERNET-2720Exception has been thrown by the target of an invocation.Bug
VIEWERNET-2702Image export failedBug
VIEWERNET-2688Can’t open ppsm fileBug
VIEWERNET-2488Exception is thrown when rendering DNG fileBug
VIEWERNET-2459Improve default font support when converting PowerPoint files to PNG/JPGFeature
VIEWERNET-2933Add support of RenderSinglePage option by getViewInfo methodImprovement
VIEWERNET-2748Evaluation watermark appears in licensed mode when viewing NSFBug
VIEWERNET-2820"Failed to open presentation with error: Input string was not in a correct format.” exception when rendering ODP fileBug
VIEWERNET-2821"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2829"Failed to open presentation with error: Object reference not set to an instance of an object.” exception when rendering PPTX fileBug
VIEWERNET-2903Rendering an EML file doesn’t show attachment detailsBug
VIEWERNET-2911"Index was out of range. Must be non-negative and less than the size of the collection. (Parameter ‘index’)” exception when rendering MPP fileBug
VIEWERNET-2914"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2923"Index was out of range. Must be non-negative and less than the size of the collection. (Parameter ‘index’)” exception when rendering MPP fileBug
VIEWERNET-2927"Index was outside the bounds of the array.” exception when rendering MPP fileBug
VIEWERNET-2935"Could not load file. File is corrupted or damaged.” exception when rendering DOCX fileBug
VIEWERNET-2937"Failed to open presentation with error: All column’s widths must be greater than zero.” exception when rendering PPTX fileBug
VIEWERNET-2978Level index must lay in 0..8 interval exception when rendering FODP fileBug
VIEWERNET-2981PPTX to HTML has a title on page top that is not in the original documentBug
VIEWERNET-1808Wrong rendering of the PCL fileBug
VIEWERNET-2486"Index was out of range” exception when rendering VSDX fileBug
VIEWERNET-2579"File is corrupted or damaged” exception is thrown when rendring DWG fileBug
VIEWERNET-2630Issue in rendering DNG fileBug
VIEWERNET-2648Can’t view vss fileBug
VIEWERNET-2664SVGZ result image damaged in PDF conversion and other conversionsBug
VIEWERNET-2711File is corrupted or damaged exception was thrown when rendering TIFF documentBug
VIEWERNET-2717HTML Rendering of PDF Files is including wrong CSSBug
VIEWERNET-2830"Parameter is not valid.” exception when rendering ODS fileBug
VIEWERNET-2849Value cannot be null. Parameter name: sourceBug
VIEWERNET-2857File is damaged for MHT fileBug
VIEWERNET-2861"Object reference not set to an instance of an object.” exception when rendering VSS fileBug
VIEWERNET-2925"Object reference not set to an instance of an object.” exception when rendering VSSX fileBug
VIEWERNET-2932Destination array is not long enough to copy all the items in the collection. Check array index and length.Bug
VIEWERNET-2939The column index should not be inside the pivottable reportBug
VIEWERNET-2943Cannot render RAR to PNGBug
VIEWERNET-2951Rendering XLSM to HTML takes a lot of timeBug
VIEWERNET-2955Links are rendered incorrectly when rendering Markdown fileBug
VIEWERNET-280Support for .ai (Adobe Illustrator) file formatFeature
VIEWERNET-2931Add Microsoft Compiled HTML Help (CHM) file-format supportFeature
VIEWERNET-2949Render multipaged PDF to single page HTMLFeature
VIEWERNET-3008Add Truevision TGA (TARGA) (tga) file-format supportFeature
VIEWERNET-3010Add Animated PNG (apng) file-format supportFeature
VIEWERNET-2934Add gdv prefix to all CSS class names in custom templatesImprovement
VIEWERNET-2950View DOCX in PDF mode exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Bug
VIEWERNET-3019Rename RenderSinglePage property to RenderToSinglePage in HtmlViewOptionsBug
VIEWERNET-3070Render spreadsheet by page breaksFeature
VIEWERNET-3068Render presentations documents to single page HTMLFeature
VIEWERNET-3050Add support of rendering text in PDF files as imagesFeature
VIEWERNET-3043Support for PC3 file printer configuration when rendering CAD formatsFeature
VIEWERNET-3039Support MaxHeight and MaxWidth options when rendering to JPG/PNGFeature
VIEWERNET-3009Support play/stop animation when rendering APNG imagesFeature
VIEWERNET-3006Add TimeFormat and TimeZone setting when rendering Email documents to HTMLFeature
VIEWERNET-3003Add Email Mailbox File (.mbox) file-format supportFeature
VIEWERNET-2316Support play/stop animation when rendering GIF imagesFeature
VIEWERNET-3069Visio to PDF rendering - output lacks a lot of textBug
VIEWERNET-3058Replacing the default font doesn’t work on LinuxBug
VIEWERNET-3057Missing Polish signs in EML to HTML or PDF renderingBug
VIEWERNET-3055Replacing the default font doesn’t work on LinuxBug
VIEWERNET-3047Incorrect image dimensions for VCF filesBug
VIEWERNET-3046Freezes on format-detectionBug
VIEWERNET-3045Incorrect image dimensions for Archive filesBug
VIEWERNET-3044getViewInfo returns small page dimensions for Visio filesBug
VIEWERNET-3002"The number greater than zero is expected. (Parameter ‘width’)” exception when rendering VSDX fileBug
VIEWERNET-2996"Image export failed.” exception when rendering EMF fileBug
VIEWERNET-2990"The number greater than zero is expected. (Parameter ‘width’)” exception when rendering DWG fileBug
VIEWERNET-2989"The number greater than zero is expected. (Parameter ‘width’)” exception when rendering DXF fileBug
VIEWERNET-2985Performance drop in rendering word processing files to HTMLBug
VIEWERNET-2936Specific DWF file is rendering too long.Bug
VIEWERNET-2929"Arithmetic operation resulted in an overflow.” exception when rendering DOCX fileBug
VIEWERNET-2928"Could not load file. File is corrupted or damaged.” exception when rendering DXF fileBug
VIEWERNET-2922"Image export failed.” exception when rendering JP2 fileBug
VIEWERNET-2919Parameter is not valid. for cdr fileBug
VIEWERNET-2910"Could not load file. File is corrupted or damaged.” exception when rendering IFC fileBug
VIEWERNET-2909"The number greater than zero is expected. (Parameter ‘width’)” exception when rendering CMX fileBug
VIEWERNET-2876The image is blank when rendering a specific DWG file to PNG in Linux (docker container).Bug
VIEWERNET-2875The output image is blank when converting a specific STL file to PNG.Bug
VIEWERNET-2874Jpeg quality option does not work when rendering CAD files to JPEG in Linux docker containers.Bug
VIEWERNET-2864"The number greater than zero is expected. (Parameter ‘width’)” exception when rendering DWF fileBug
VIEWERNET-2863Parameter is not valid. for AutoCad fileBug
VIEWERNET-2862"CAD document rendering failed.Please check that CadOptions sizing options do not have too low or too high values.” exception when rendering DGN fileBug
VIEWERNET-2860"The number greater than zero is expected. (Parameter ‘width’)” exception when rendering DWF fileBug
VIEWERNET-2853"Could not load file. File is corrupted or damaged.” exception when rendering IFC fileBug
VIEWERNET-2847"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2846"Could not load file. File is corrupted or damaged.” exception when rendering IFC fileBug
VIEWERNET-2840"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2837"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2836"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2835"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2834"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2833"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2816"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-2762"Certain Excel to HTML conversion, alignment issuesBug
VIEWERNET-2752"GroupDocs.Viewer throws GroupDocsViewerException “Image export failed” exception when rendering specific Corel Metafile exchange (cmx) fileBug
VIEWERNET-2713Could not load file. File is corrupted or damaged when rendering DWF fileBug
VIEWERNET-2689StackOverFlow errorBug
VIEWERNET-2475Exception: Failed to render CAD document into PDFBug
VIEWERNET-2314Support quality setting when rendering OneNote filesFeature
VIEWERNET-3094Support Width/Height/MaxWidth/MaxHeight params by getViewInfo methodFeature
VIEWERNET-3132Add FilePath parameter to Attachment classFeature
VIEWERNET-3049Improve error message when loading unsupported Numbers fileImprovement
VIEWERNET-2979Specified Font is not embedded in an output HTML document.Bug
VIEWERNET-2988"Could not load file. File is corrupted or damaged.” exception when rendering DXF fileBug
VIEWERNET-2991"Failed to open presentation with error: Error reading adjustment value: connsiteX0 = “*/ 0 w 8286” exception when rendering PPTX fileBug
VIEWERNET-2993"Failed to open presentation with error: Object reference not set to an instance of an object.” exception when rendering PPTX fileBug
VIEWERNET-2995"Image export failed.” exception when rendering WMF fileBug
VIEWERNET-2997"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-3000"Failed to render CAD document into PDF.” exception when rendering DXF fileBug
VIEWERNET-3059"Could not load file. File is corrupted or damaged” exception when rendering DXF fileBug
VIEWERNET-3061"Failed to render CAD document into PDF.” exception when rendering DXF fileBug
VIEWERNET-3090Not all layers are rendered in specific CAD fileBug
VIEWERNET-3096The number greater than zero is expected. (Parameter ‘width’) exception when calling getViewInfo for VSS fileBug
VIEWERNET-3097"Could not load file. File is corrupted or damaged.” exception when rendering DXF fileBug
VIEWERNET-3101Html markup broken for specific VSD fileBug
VIEWERNET-3108Search is not working for Excel and PowerPoint files in jQuery ViewerBug
VIEWERNET-3128Shifted drawing when converting to PNG in LinuxBug
VIEWERNET-3129EML document takes too long time to render to HTMLBug
VIEWERNET-3130Incorrect headings when rendering spreadsheets by page breaksBug
VIEWERNET-2945Add support of resizing images when rendering to HTML/PDFFeature
VIEWERNET-3135Watermark styles are breaking page layoutBug
VIEWERNET-2852"Image export failed.” exception when rendering SVG fileBug
VIEWERNET-3151Output SVG is not valid when converting EMFBug
VIEWERNET-2814Could not load file. File is corrupted or damaged.Bug
VIEWERNET-3101Html markup broken for specific VSD fileBug
VIEWERNET-3149Content is missing when rendering XLSX fileBug
VIEWERNET-3154Ignore empty pages when rendering Excel spreadsheetsBug
VIEWERNET-3156Output image or html is filled with black colorBug
VIEWERNET-3157Exception thrown when rendering from PDF with images in LinuxBug
VIEWERNET-3158Default font is not applied when rendering PPTXBug
VIEWERNET-2828"Could not load file. File is corrupted or damaged.” exception when rendering IFC fileBug
VIEWERNET-3161Descriptive exception message when opening password-protected ODP/OTP presentationsBug
VIEWERNET-2786Problem with jpf image cache sizeBug
VIEWERNET-2742Image export failed JPFBug
VIEWERNET-3105DOCX to HTML: Incorrect SVG image renderingBug
VIEWERNET-3071"Value cannot be null.Parameter name: key” exception when rendering PDF to JPEG in LinuxBug
VIEWERNET-3180License is not recognizedBug
VIEWERNET-2478Optimize output HTML for printingFeature
VIEWERNET-3224Support rendering of VCF files that contain contacts listFeature
VIEWERNET-3240Improve rendering performance for files without headerImprovement
VIEWERNET-3277Render spreadsheets similar to Excel (by page breaks) by defaultImprovement
VIEWERNET-3278Add factory methods without parameters to ViewInfoOptionsImprovement
VIEWERNET-3279Add utility method to retrieve filetype by filename or filepathImprovement
VIEWERNET-3134"Failed to render CAD document into PDF.” exception when rendering DWF fileBug
VIEWERNET-3142Long conversion time to HTML for certain DOC fileBug
VIEWERNET-3182"Arithmetic operation resulted in an overflow.” exception when rendering CDR fileBug
VIEWERNET-3199"The added or subtracted value results in an un-representable DateTime. (Parameter ‘value’) exception” when try to get info from specific MPX fileBug
VIEWERNET-3235Could not load file. File is corrupted or damaged exception when rendering TGABug
VIEWERNET-2471"File is corrupted or damaged” exception when rendering IFC fileBug
VIEWERNET-2908PDF to HTML conversion: overlapping text and text out of place in the outputBug
VIEWERNET-3223Viewer - html files with erroneous css classBug
VIEWERNET-3237Empty image when rendering spreadsheet and ignoring empty rows and columnsBug
VIEWERNET-3323Define page size when rendering TXT to HTMLFeature
VIEWERNET-3296Specify default document to open as a query string parameter in Angular UIFeature
VIEWERNET-3227Make special exception message if file protected by RMSImprovement
VIEWERNET-3181Change DGN V8 exception messageImprovement
VIEWERNET-3330Conversion GIF to HTML - A generic error occurred in GDI+Bug
VIEWERNET-3328getViewInfo returns hidden Excel worksheetsBug
VIEWERNET-3326Incorrect page size when rendering spreadsheets by rowsBug
VIEWERNET-3322Incorrect page size when rendering spreadsheets by page breaksBug
VIEWERNET-3316Null reference exception when converting certain XLSM to HTMLBug
VIEWERNET-3300PNG image becomes a black squareBug
VIEWERNET-3298Preserve the page layout of the original document when rendering in pngBug
VIEWERNET-3297"Object reference not set to an instance of an object.” exception when rendering VSSX fileBug
VIEWERNET-3290"Parameter is not valid.” exception when rendering VSD file to HTMLBug
VIEWERNET-3285'Object reference not set to an instance of an object.’ when getting view info for VSS-fileBug
VIEWERNET-3284Rendering table headings of XLSX as HTML not working for hidden columnsBug
VIEWERNET-3282Convert GIF to HTML - bad qualityBug
VIEWERNET-3276"Unexcepted eof.” exception when rendering VSDX fileBug
VIEWERNET-3270"Value was either too large or too small for an Int32.” exception when rendering DOCX fileBug
VIEWERNET-3231"Parameter is not valid.” exception when rendering VSD fileBug
VIEWERNET-3219"The argument cannot be null or empty string. (Parameter ‘name’)” exception when rendering ODS fileBug
VIEWERNET-3184Invalid row index when rendering XLSMBug
VIEWERNET-2924"Image export failed.” exception when rendering EMF fileBug
VIEWERNET-2848"Image export failed.” exception when rendering TIFF fileBug
VIEWERJAVA-2468Viewer - html files with erroneous css classBug
VIEWERJAVA-2718java.lang.IllegalStateException: Cannot load configuration class: com.groupdocs.ui.ApplicationBug
VIEWERJAVA-2721Getting NoSuchAlgorithmException when converting XLSX to pdfBug
VIEWERJAVA-2604Preserve original image format when converting JPEG to HTMLBug

Public API and Backward Incompatible Changes

Behavior changes

  • In this version we’ve improved viewing of Visio documents - now you can choose what to render: Visio figures or Visio scheme(diagram), also Visio figures will be rendered automatically if Visio document does not contain scheme pages.

  • In this version we’ve improved viewing of archives - now you can navigate between archive folder with Windows explorer behavior:

    Windows explorer navigation style

    For more details and code snippets check Folder navigation in archive files documentation article.

  • In this version we’ve improved viewing of archives - when you use HtmlViewOptions with setRenderSinglePage(true) and calling the getViewInfo method you get 1 page in result info:

        try (Viewer viewer = new Viewer("sample.zip")) {
            HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
            viewOptions.setRenderSinglePage(true);
    
            ViewInfoOptions viewInfoOptions = ViewInfoOptions.fromHtmlViewOptions(viewOptions);
            ViewInfo viewInfo = viewer.getViewInfo(viewInfoOptions);
    
            // will print "Zipped File (.zip) with 1 page(s)"
            System.out.println(viewInfo);
    
            // will produce single page
            viewer.view(viewOptions);
          }
    
  • Now when rendering APNG and GIF to HTML you will get a page with an animated picture. If an animated file contains only one frame, HTML with static image will be generated.

    Animated PNG in HTML

Public API Changes

com.groupdocs.viewer.FileType

Few fields added to FileType class that reflect new file formats that we’re supporting starting from v21.11.

   /**
   * Scalable Vector Graphics File (.svgz) is a Scalar Vector Graphics file that uses XML based text format, compressed by GZIP for describing the appearance of an image.
   * Learn more about this file format <a href="https://fileinfo.com/extension/svgz">here</a>.
   */
   SVGZ("Compressed Scalable Vector Graphics File", ".svgz"),
  
   /**
    * <p>
    * Lotus Notes Database (.nsf)
    * Learn more about this file format https://fileinfo.com/extension/nsf
    * </p>
    */
   NSF("Lotus Notes Database", ".nsf")

   /**
    * <p>
    * Photoshop Large Document Format (.psb) represents Photoshop Large Document Format used for graphics designing and development.
    * Learn more about this file format <a href="https://wiki.fileformat.com/image/psb">here</a>.
    * </p>
    */
   PSB("Photoshop Large Document Format", ".psb")

   /**
    * <p>
    * Corel Exchange (.cmx) is a drawing image file that may contain vector graphics as well as bitmap graphics.
    * Learn more about this file format <a href="https://wiki.fileformat.com/image/cmx">here</a>.
    * </p>
    */
   CMX("Corel Metafile exchange", ".cmx")

   /**
    * <p>
    * Enhanced Windows Metafile compressed (.emz) represents graphical images device-independently compressed by GZIP. Metafiles of EMF comprises of variable-length records in chronological order that can render the stored image after parsing on any output device.
    * Learn more about this file format <a href="https://wiki.fileformat.com/image/emz">here</a>.
    * </p>
    */
   EMZ("Windows Compressed Enhanced Metafile", ".emz")

   /**
    * <p>
    * ompressed Windows Metafile (.wmz) represents Microsoft Windows Metafile (WMF) compressed in GZIP archvive - for storing vector as well as bitmap-format images data.
    * Learn more about this file format <a href="https://fileinfo.com/extension/wmz#compressed_windows_metafile">here</a>.
    * </p>
    */
   WMZ("Compressed Windows Metafilee", ".wmz")

   /**
    * Microsoft Compiled HTML Help File (.chm) is a well-known format for HELP (documentation to some application) documents.
    * Learn more about this file format <a href="https://docs.fileformat.com/web/chm/">here</a>.
    */
   CHM("Microsoft Compiled HTML Help File", ".chm")

   /**
    * Adobe Illustrator (.ai) is a file format for Adobe Illustrator drawings.
    * Learn more about this file format <a href="https://fileinfo.com/extension/ai#adobe_illustrator_file">here</a>.
    */
   AI("Adobe Illustrator", ".ai")

   /**
    * Truevision TGA (Truevision Advanced Raster Adapter - TARGA) is used to store bitmap digital images developed by TRUEVISION.
    * Learn more about this file format <a href="https://wiki.fileformat.com/image/tga">here</a>.
    */
   TGA("Truevision TGA (TARGA)", ".tga")

   /**
    * Animated Portable Network Graphic (.apng) is extension of  PNG format that support animation.
    * Learn more about this file format <a href="https://wiki.fileformat.com/image/apng">here</a>.
    */
   APNG("Animated Portable Network Graphic", ".apng")

   /**
    * Email Mailbox File (.mbox)
    * Learn more about this file format <a href="https://fileinfo.com/extension/mbox">here</a>.
    */
   MBOX("Email Mailbox File", ".mbox")

Added utility method to get FileType from filename or filepath

  /**
   * Extracts file extension and maps it to file type.
   *
   * @param filePath The file name or file path.
   * @return When file type is supported returns it, otherwise returns default {@link FileType.UNKNOWN} file type.
   */
  public static FileType fromFilePath(String filePath) { ... }

com.groupdocs.viewer.options.VisioRenderingOptions

Added VisioRenderingOptions class to com.groupDocs.viewer.options package. This class provides options for rendering Lotus Notes data files.

/**
 * The Visio files processing documents view options.
 */
public class VisioRenderingOptions {
  /**
   * Render only Visio figures, not a diagram
   */
  public boolean isRenderFiguresOnly() { ... }

  /**
   * Render only Visio figures, not a diagram
   */
  public void setRenderFiguresOnly(boolean renderFiguresOnly) { ... }

  /**
   * Figure width, height will be calculated automatically
   */
  public int getFigureWidth() { ... }

  /**
   * Figure width, height will be calculated automatically. Default value is 100.
   */
  public void setFigureWidth(int figureWidth) { ... }


  /**
   * Initializes new instance of VisioRenderingOptions class.
   */
  public VisioRenderingOptions() { ... }
}

com.groupdocs.viewer.logging

Class ConsoleLogger was added to com.groupdocs.viewer.logging package. This class provides support for logging GroupDocs.Viewer conversion process to console.

/**
 * <p>
 * Represents logger implementation which sends all messages to console.
 * </p>
 */
public final class ConsoleLogger implements ILogger {

  /**
   * Initializes a new instance of the ConsoleLogger class
   */
  public ConsoleLogger() { ... }

  public ConsoleLogger(boolean isTraceEnabled) { ... }

  public ConsoleLogger(boolean isTraceEnabled, boolean isDebugEnabled) { ... }

  public ConsoleLogger(boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled) { ... }

  public void setTraceEnabled(boolean isTraceEnabled) { ... }

  public void setDebugEnabled(boolean isDebugEnabled) { ... }

  public void setWarningEnabled(boolean isWarningEnabled) { ... }

  public void setErrorEnabled(boolean isErrorEnabled) { ... }

  /**
   * Writes a trace message to the console.
   * Trace log messages provide detailed information about application flow.
   * @param message   The trace message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void trace(String message, Object... arguments) { ... }

  /**
   * Writes a trace message to the console.
   * Trace log messages provide detailed information about application flow.
   * @param throwable The throwable object
   * @param message   The trace message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void trace(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isTraceEnabled() { ... }

  /**
   * Writes a debug message to the console.
   * Debug log messages provide generally useful information about application flow.
   * @param message   The debug message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void debug(String message, Object... arguments) { ... }

  /**
   * Writes a debug message to the console.
   * Debug log messages provide generally useful information about application flow.
   * @param throwable The throwable object
   * @param message   The debug message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void debug(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isDebugEnabled() { ... }

  /**
   * Writes a warning message to the console.
   * Warning log messages provide information about unexpected and recoverable events in application flow.
   * @param message   The warning message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void warning(String message, Object... arguments) { ... }

  /**
   * Writes a warning message to the console.
   * Warning log messages provide information about unexpected and recoverable events in application flow.
   * @param throwable The throwable object
   * @param message   The warning message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void warning(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isWarningEnabled() { ... }

  /**
   * Writes an error message to the console.
   * Error log messages provide information about unrecoverable events in application flow.
   * @param message   The error message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void error(String message, Object... arguments) { ... }

  /**
   * Writes an error message to the console.
   * Error log messages provide information about unrecoverable events in application flow.
   * @param throwable The throwable object
   * @param message   The error message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void error(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isErrorEnabled() { ... }
}

Class FileLogger was added to com.groupdocs.viewer.logging This class provides support for logging GroupDocs.Viewer conversion process to file.

/**
 * Writes log messages to the file.
 */
public class FileLogger implements ILogger {
  private final String mFileName;
  private final boolean mTraceEnabled;
  private final boolean mDebugEnabled;
  private final boolean mWarningEnabled;
  private final boolean mErrorEnabled;

  /**
   * Create logger to file.
   *
   * @param fileName Full file name with path
   */
  public FileLogger(String fileName) { ... }

  /**
   * Create logger to file.
   */
  public FileLogger(String fileName, boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled) { ... }

  public void setTraceEnabled(boolean isTraceEnabled) { ... }

  public void setDebugEnabled(boolean isDebugEnabled) { ... }

  public void setWarningEnabled(boolean isWarningEnabled) { ... }

  public void setErrorEnabled(boolean isErrorEnabled) { ... }

  /**
   * Writes a trace message to the file.
   * Trace log messages provide detailed information about application flow.
   * @param message   The trace message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void trace(String message, Object... arguments) { ... }

  /**
   * Writes a trace message to the file.
   * Trace log messages provide detailed information about application flow.
   * @param throwable The throwable object
   * @param message   The trace message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void trace(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isTraceEnabled() { ... }

  /**
   * Writes a debug message to the file.
   * Debug log messages provide generally useful information about application flow.
   * @param message   The debug message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void debug(String message, Object... arguments) { ... }

  /**
   * Writes a debug message to the file.
   * Debug log messages provide generally useful information about application flow.
   * @param throwable The throwable object
   * @param message   The debug message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void debug(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isDebugEnabled() { ... }

  /**
   * Writes a warning message to the file.
   * Warning log messages provide information about unexpected and recoverable events in application flow.
   * @param message   The warning message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void warning(String message, Object... arguments) { ... }

  /**
   * Writes a warning message to the file.
   * Warning log messages provide information about unexpected and recoverable events in application flow.
   * @param throwable The throwable object
   * @param message   The warning message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void warning(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isWarningEnabled() { ... }

  /**
   * Writes an error message to the file.
   * Error log messages provide information about unrecoverable events in application flow.
   * @param message   The error message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void error(String message, Object... arguments) { ... }

  /**
   * Writes an error message to the file.
   * Error log messages provide information about unrecoverable events in application flow.
   * @param throwable The throwable object
   * @param message   The error message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  public void error(Throwable throwable, String message, Object... arguments) { ... }

  public boolean isErrorEnabled() { ... }
}

Class ILogger was added to com.groupdocs.viewer.logging. This interface provides support for custom logger implementation.

/**
 * Defines the methods that are used to perform logging.
 */
public interface ILogger {

  void setTraceEnabled(boolean isTraceEnabled);

  void setDebugEnabled(boolean isDebugEnabled);

  void setWarningEnabled(boolean isWarningEnabled);

  void setErrorEnabled(boolean isErrorEnabled);

  /**
   * Writes a trace message to the file.
   * Trace log messages provide detailed information about application flow.
   * @param message   The trace message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void trace(String message, Object... arguments);

  /**
   * Writes a trace message to the file.
   * Trace log messages provide detailed information about application flow.
   * @param throwable The throwable object
   * @param message   The trace message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void trace(Throwable throwable, String message, Object... arguments);

  boolean isTraceEnabled();

  /**
   * Writes a debug message to the file.
   * Debug log messages provide generally useful information about application flow.
   * @param message   The debug message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void debug(String message, Object... arguments);

  /**
   * Writes a debug message to the file.
   * Debug log messages provide generally useful information about application flow.
   * @param throwable The throwable object
   * @param message   The debug message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void debug(Throwable throwable, String message, Object... arguments);

  boolean isDebugEnabled();

  /**
   * Writes a warning message to the file.
   * Warning log messages provide information about unexpected and recoverable events in application flow.
   * @param message   The warning message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void warning(String message, Object... arguments);

  /**
   * Writes a warning message to the file.
   * Warning log messages provide information about unexpected and recoverable events in application flow.
   * @param throwable The throwable object
   * @param message   The warning message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void warning(Throwable throwable, String message, Object... arguments);

  boolean isWarningEnabled();

  /**
   * Writes an error message to the file.
   * Error log messages provide information about unrecoverable events in application flow.
   * @param message   The error message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void error(String message, Object... arguments);

  /**
   * Writes an error message to the file.
   * Error log messages provide information about unrecoverable events in application flow.
   * @param throwable The throwable object
   * @param message   The error message, can contain {} to be replaced with arguments
   * @param arguments The arguments, replaces {} in message in order of passing
   */
  void error(Throwable throwable, String message, Object... arguments);

  boolean isErrorEnabled();
}

com.groupdocs.viewer.Viewer

New property and constructor added to ViewerSettings class.

  /**
   * The logger implementation used for logging (Errors, Warnings, Traces).
   */
  public ILogger getLogger() { ... }
  
  /**
   * Initializes new instance of ViewerSettings class.
   * @param cache The cache.
   * @param logger The logger.
   */
  public ViewerSettings(ICache cache, ILogger logger) { ... }

In this version we added four new constructors to the Viewer class.

// The following constructors has been added
public Viewer(InputStream stream, boolean leaveOpen)
public Viewer(InputStream stream, LoadOptions loadOptions, boolean leaveOpen)
public Viewer(InputStream stream, ViewerSettings settings, boolean leaveOpen)
public Viewer(InputStream stream, LoadOptions loadOptions, ViewerSettings settings, boolean leaveOpen)

Class MailStorageOptions was added to com.groupdocs.viewer.options This class provides view options for viewing mail storage formats like Lotus Notes (NSF)

  /**
   * Provides options for rendering Mail storage (Lotus Notes, MBox) data files.
   */
  public class MailStorageOptions {
  
    /**
     * The keywords used to filter messages.
     */
    public String getTextFilter() { ...}
  
    /**
     * Sets the keywords used to filter messages.
     *
     * @param textFilter the keywords used to filter messages.
     */
    public void setTextFilter(String textFilter) { ...}
  
    /**
     * The email-address used to filter messages by sender or recipient.
     *
     * @return The email-address
     */
    public String getAddressFilter() { ...}
  
    /**
     * Sets email-address used to filter messages by sender or recipient.
     *
     * @param addressFilter the email-address used to filter messages
     */
    public void setAddressFilter(String addressFilter) { ...}
  
    /**
     * The maximum number of messages or items for render.
     * <p>
     * Lotus notes data files can be large and retrieving all messages can take significant time.
     * This setting limits maximum number of messages or items that are rendered.
     * Default value is 0 - all messages will be rendered
     */
    public int getMaxItems() { ...}
  
    /**
     * Sets maximum number of messages or items for render.
     * <p>
     * Lotus notes data files can be large and retrieving all messages can take significant time.
     * This setting limits maximum number of messages or items that are rendered.
     * Default value is 0 - all messages will be rendered
     *
     * @param maxItems Maximum number of messages
     */
    public void setMaxItems(int maxItems) { ...}
  }

com.groupdocs.viewer.options.BaseViewOptions class

Fields were added to BaseViewOptions class that reflects new view options for new file formats that we’re supporting starting from v21.11.

/**
 * Lotus Notes storage data files view options.
 */
public MailStorageOptions getMailStorageOptions() { ... }

/**
 * Lotus Notes storage data files view options.
 */
public void setMailStorageOptions(MailStorageOptions options) { ... }

com.groupdocs.viewer.options.HtmlViewOptions class

com.groupdocs.viewer.options.HtmlViewOptions#setRenderSinglePage(boolean) and com.groupdocs.viewer.options.HtmlViewOptions#isRenderSinglePage() properties set as deprecated. These properties will be removed in next releases, please use setRenderToSinglePage(…) and isRenderToSinglePage() properties.

Properties com.groupdocs.viewer.options.HtmlViewOptions#setRenderToSinglePage(boolean) and com.groupdocs.viewer.options.HtmlViewOptions#isRenderToSinglePage(boolean) were added.

Interface IMaxSizeOptions was added to com.groupdocs.viewer.options. This interface provides MaxSize options for rendering to PNG/JPG output.

  /**
   * Limits of image size options interface.
   */
  public interface IMaxSizeOptions {
    /**
     * Max width of an output image in pixels.
     */
    int getMaxWidth();
  
    /**
     * Max width of an output image in pixels.
     */
    void setMaxWidth(int maxWidth);
  
    /**
     * Max height of an output image in pixels.
     */
    int getMaxHeight();
  
    /**
     * Max height of an output image in pixels.
     */
    void setMaxHeight(int maxHeight);
  }

com.groupdocs.viewer.options

Fields were added to PngViewOptions class and to JpgViewOptions class that reflects MaxSize options for rendering to PNG/JPG output that we’re supporting starting from v21.11. Both classes now implement interface IMaxSizeOptions.

  /**
   * Max width of an output image in pixels.
   */
  int getMaxWidth();
  
  /**
   * Max width of an output image in pixels.
   */
  void setMaxWidth(int maxWidth);
  
  /**
   * Max height of an output image in pixels.
   */
  int getMaxHeight();
  
  /**
   * Max height of an output image in pixels.
   */
  void setMaxHeight(int maxHeight);

com.groupdocs.viewer.options.SpreadsheetOptions class

SpreadsheetOptions#forRenderingByPageBreaks() method was added that add support for split Excel sheets by page breaks when rendering.

com.groupdocs.viewer.options.CadOptions class

CadOptions#getPc3File() and CadOptions#setPc3File(…) methods were added that add support to apply PC3 configuration plotter file when rendering CAD files.

com.groupdocs.viewer.options.EmailOptions class

Properties were added to EmailOptions class that adds support to set time zone offset and date-time format when rendering E-mail messages to HTML.

  /**
   * Time Format (can be included TimeZone)
   * for example: 'MM d yyyy HH:mm tt', if not set - current system format is used
   */
  public String getDateTimeFormat() { ... }
  
  /**
   * Time Format (can be included TimeZone)
   * for example: 'MM d yyyy HH:mm tt', if not set - current system format is used
   */
  public void setDateTimeFormat(String dateTimeFormat) { ... }
  
  /**
   * Message time zone offset
   */
  public TimeZone getTimeZoneOffset() { ... }
  
  /**
   * Message time zone offset
   */
  public void setTimeZoneOffset(TimeZone timeZoneOffset) { ... }

com.groupdocs.viewer.results.Attachment

The setFilePath(...) and getFilePath() methods has been added to Attachment class. It is used to keep a relative attachment path or attachment filename.

    /**
     * Attachment relative path e.g. "folder/file.docx"</example>" or filename when the file is located in the root of an archive, in e-mail message or data file.
     */
    String getFilePath() { ... }

In addition, all three constructor methods for creating attachment objects in CacheableFactory have been updated to accept the filePath parameter.

com.groupdocs.viewer.options.ViewInfoOptions

New methods have been added to ViewInfoOptions class. It is used to keep a relative attachment path or attachment filename.


/**
 * Max width of the output image (for rendering to PNG/JPG only)
 */
public int getMaxWidth() { ... }

/**
 * Max width of the output image (for rendering to PNG/JPG only)
 */
public void setMaxWidth(int maxWidth) { ... }

/**
 * Max height of the output image (for rendering to PNG/JPG only)
 */
public int getMaxHeight() { ... }

/**
 * Max height of the output image (for rendering to PNG/JPG only)
 */
public void setMaxHeight(int maxHeight) { ... }

/**
 * Image width (for rendering to PNG/JPG only)
 */
public int getWidth() { ... }

/**
 * Image width (for rendering to PNG/JPG only)
 */
public void setWidth(int width) { ... }

/**
 * Image height (for rendering to PNG/JPG only)
 */
public int getHeight() { ... }

/**
 * Image height (for rendering to PNG/JPG only)
 */
public void setHeight(int height) { ... }

Behavior changes

You can set output JPEG quality when converting OneNote files using the following code:

    try (Viewer viewer = new Viewer("document.one")) {
        JpgViewOptions options = new JpgViewOptions("result_{0}.jpg");
        options.setQuality(50);

        viewer.view(options);
    }

Changes in com.groupdocs.viewer.options package

New methods have been added to HtmlViewOptions and PdfViewOptions classes.


/**
 * Max width of an output image in pixels. (When converting single image to HTML only)
 */
public int getImageMaxWidth() { ... }

/**
 * Max width of an output image in pixels. (When converting single image to HTML only)
 */
public void setImageMaxWidth(int imageMaxWidth) { ... }

/**
 * Max height of an output image in pixels. (When converting single image to HTML only)
 */
public int getImageMaxHeight() { ... }

/**
 * Max height of an output image in pixels. (When converting single image to HTML only)
 */
public void setImageMaxHeight(int imageMaxHeight) { ... }

/**
 * The width of the output image in pixels. (When converting single image to HTML only)
 */
public int getImageWidth() { ... }

/**
 * The width of the output image in pixels. (When converting single image to HTML only)
 */
public void setImageWidth(int imageWidth) { ... }

/**
 * The height of an output image in pixels. (When converting single image to HTML only)
 */
public int getImageHeight() { ... }

/**
 * The height of an output image in pixels. (When converting single image to HTML only)
 */
public void setImageHeight(int imageHeight) { ... }

com.groupdocs.viewer.options.BaseViewOptions class

The default value of BaseViewOptions#setSpreadsheetOptions(…) has been changed from SpreadsheetOptions.forSplitSheetIntoPages(40) to SpreadsheetOptions.forRenderingByPageBreaks()

We’ve changed default value to make the output similar to the output you can get when printing spreadsheet in Excel. See Render spreadsheets by page breaks for more details.

Added new TextOptions property.

  /**
   * Text files splitting to pages options.
   */
  public TextOptions getTextOptions() { ... }
  
  /**
   * Text files splitting to pages options.
   */
  public void setTextOptions(TextOptions textOptions) { .. }

And related TextOptions class to configure rendering text files e.g TXT, LOG.

  /**
   * Text files splitting to pages options.
   */
  public class TextOptions {
  
    /**
     * Max chars per row on page. Default value is 85.
     */
    public int getMaxCharsPerRow() { ... }
  
    /**
     * Max chars per row on page. Default value is 85.
     */
    public void setMaxCharsPerRow(int maxCharsPerRow) { ... }
  
    /**
     * Max rows per page. Default value is 55.
     */
    public int getMaxRowsPerPage() { ... }
  
    /**
     * Max rows per page. Default value is 55.
     */
    public void setMaxRowsPerPage(int maxRowsPerPage) { ... }
  }

See how to use new properties in Define page size when rendering TXT to HTML.

com.groupdocs.viewer.options.ViewInfoOptions class

Added three factory methods without parameters:

  /**
   * Initializes new instance of {@link ViewInfoOptions} class to retrieve information about view when rendering into HTML.
   *
   * @return New instance of {@link ViewInfoOptions} class.
   */
  public static ViewInfoOptions forHtmlView() { ... }
  
  /**
   * Initializes new instance of {@link ViewInfoOptions} class to retrieve information about view when rendering into JPG.
   *
   * @return New instance of {@link ViewInfoOptions} class.
   */
  public static ViewInfoOptions forJpgView() { ... }
  
  
  /**
   * Initializes new instance of {@link ViewInfoOptions} class to retrieve information about view when rendering into PNG.
   *
   * @return New instance of {@link ViewInfoOptions} class.
   */
  public static ViewInfoOptions forPngView() { ... }

com.groupdocs.viewer.options.HtmlViewOptions class

Methods HtmlViewOptions#isForPrinting() and HtmlViewOptions#setForPrinting(boolean) were added that add optimize output HTML for printing support.