Latest release (August 2024)

Full list of changes in this release

KeyCategorySummary
VIEWERNET‑4658FeatureUnlink table of contents in Word documents
VIEWERNET‑3308FeatureMake ePub pages rendering as text, but not picture
VIEWERNET‑4712FeatureIntroduce new performance-oriented conversion mode for CAD format family
VIEWERNET‑4596EnhancementScale up the output image size to 1920px by width or 1080px by height when rendering presentations to PNG/JPEG
VIEWERNET‑4593FixIncorrect result during rendering XLSM
VIEWERNET‑3374FixArtifacts rendered when converting PCL file
VIEWERNET‑3602FixGet pages count for epub not work
VIEWERNET‑4598FixSome documents not render as expected
VIEWERNET‑4597FixMemory leak occurs when the leaveOpen parameter is set to true
VIEWERNET‑4030Fix“Image with color palette is not supported.” exception when rendering CMX file
VIEWERNET‑4418FixContent is missing when rendering RTF file
VIEWERNET‑3950FixLines are too thick converting certain DWG to HTML
VIEWERNET‑4567FixImage stretching issue
VIEWERNET‑3968FixIFC files are rendering as black image result in Linux
VIEWERNET‑4539FixDocx searching problem
VIEWERNET‑3527Fix“CAD document rendering failed.Please check that CadOptions sizing options do not have too low or too high values.” exception when rendering DWG file
VIEWERNET‑3636FixOverflow HideText and OverlayIfNextIsEmpty rendering are broken
VIEWERNET‑4244FixImage missing whilst rendering as HTML page
VIEWERNET‑2641FixInvalid parameter exception when rendering PS file
VIEWERNET‑2791FixCache size is too big
VIEWERNET‑7FixContent is shifted when rendering mht to pdf or image
VIEWERNET‑5FixIssue in Rendering PDF Document into HTML and Image
VIEWERNET‑11FixText not getting displayed on browser in HTML mode
VIEWERNET‑3605Fix“File type is not supported.” exception when rendering XML excel XLS file
VIEWERNET‑2994Fix“The number greater than zero is expected. (Parameter ‘width’)” exception when rendering XLSX file
VIEWERNET‑2851Fix“Image export failed.” exception when rendering DWF file on Linux
VIEWERNET‑3805Fix“Bit depth of 8 bits are supported for RGBA images.” exception when rendering PNG file
VIEWERNET‑3624Fix“File type is not supported.” exception when rendering XLS file
VIEWERNET‑3804FixMethod not found exception when rendering MPP file
VIEWERNET‑3811FixMethod not found exception when rendering MPP file
VIEWERNET‑3437Fix“PdfFileInfo is not initialized. Use constructors with parameters or properties for initialization. (Reason: Incorrect file header)” exception when rendering IGS file
VIEWERNET‑3265Fix“The number greater than zero is expected. (Parameter ‘width’)” exception when rendering CDR file
VIEWERNET‑2482Fix“Image export failed” exception when rendering SVG file
VIEWERNET‑3306Fix“Image export failed.” exception when rendering CDR file
VIEWERNET‑4098FixforRenderingByWidth, forRenderingByHeight, and forRenderingByScaleFactor values are ignored when rendering DWG to PDF
VIEWERNET‑3327FixSpecific DWG file loaded only when license set
VIEWERNET‑3737FixXLS file rendered incorrect
VIEWERNET‑4628FixEXIF metadata is not taken into account when showing JPG
VIEWERNET‑3779FixFreeze on save when rendering ODS file
VIEWERNET‑3331FixPDF file renders differently in Windows and Linux
VIEWERNET‑2904FixParticular PDF to HTML rendering issue
VIEWERNET‑3812FixMethod not found exception when rendering MPP file
VIEWERNET‑2866Fix“The number greater than zero is expected. (Parameter ‘width’)” exception when rendering IFC file
VIEWERNET‑3504Fix“Unable to read beyond the end of the stream.” exception when rendering XLSX file
VIEWERNET‑3225FixFile is corrupted or damaged when rendering AI file
VIEWERNET‑4586FixPDF to HTML: Rendering HTML raises the GroupDocsViewerException
VIEWERNET‑4736FixThe number greater than zero is expected. (Parameter ‘width’)
VIEWERNET‑2789FixIncorrect page size
VIEWERNET‑2758FixMissing drawing elements when converting DWG
VIEWERNET‑3371FixThe font size of superscripts does not decrease and pages grayed out when converting PS to PDF

Major Features

This release includes the following features:

Image size scaled up when rendering presentations to PNG and JPEG

When rendering presentations, such as Microsoft PowerPoint Presentation (PPTX) files, the Viewer utilizes the physical dimensions of slide size. For instance, when the presentation size in PowerPoint is 13.333 inches by 7.5 inches, the output PNG or JPEG image size will be calculated using the following formula:

Width = 13.333 * 576 / 8 = 960px Height = 7.5 * 576 / 8 = 540px

Here, the value 576 corresponds to the number of pixels per inch, and 8 is a scale factor.

Applying this formula results in an output image size of 960px x 540px, which may appear pixelated on modern screens. To enhance image quality, we scale the output JPEG or PNG image to Full HD resolution (1920x1080) proportionally by either image width or height.

So, the formulas for the same slide change to:

Width = (13.333 * 576 / 8) * F1 = 1920px Height = (7.5 * 576 / 8) * F2 = 1080px

Note that F1 and F2 both variables have value 2 in this case. F1 and F2 values are calculated based on the source slide width and height proportionally to fit size by width or height.

Image size scaled up when rendering presentations to PNG and JPEG

Removed obsolete members

com.groupdocs.viewer.options.PdfViewOptions#getJpgQuality()

This API has been removed. Please use the following code to set image quality:

PdfViewOptions viewOptions = new PdfViewOptions();
viewOptions.setPdfOptimizationOptions(new PdfOptimizationOptions());
viewOptions.getPdfOptimizationOptions().setCompressImages(true);
viewOptions.getPdfOptimizationOptions().setImageQuality(50);

Learn more about PDF optimization in Optimize the output PDF file topic.

com.groupdocs.viewer.options.PdfViewOptions#isOptimize()

This API has been removed. Please use the following code to apply spreadsheet-specific optimizations like grid lines optimization when rendering spreadsheets to PDF:

PdfViewOptions viewOptions = new PdfViewOptions();
viewOptions.setPdfOptimizationOptions(new PdfOptimizationOptions());
viewOptions.getPdfOptimizationOptions().setOptimizeSpreadsheets(true);

Learn more about rendering spreadsheets in Optimize spreadsheets in a PDF file

Automatic rotation of JPEG images based on Exif Orientation tag

GroupDocs.Viewer for Java automatically rotates and flips JPEG images based on Exif orientation metadata. This ensures that you always see images in the correct orientation, regardless of how they were captured or stored. For instance, GroupDocs.Viewer for Java automatically rotated the following image 180 degrees to display it correctly.

Automatically rotated JPEG image based on Exif Orientation tag

When rendering to HTML or PDF, you can set WordProcessingOptions#setUnlinkTableOfContents(…) to true to unlink table of contents. For HTML rendering, <a> tags with relative links will be replaced with <span> tags, removing functionality but preserving visual appearance. For PDF rendering, the table of contents will be rendered as plain text without links to document sections.

The code example below renders a Word document with table of contents as a plain text without links.

try (Viewer viewer = new Viewer("resume.docx")) {
    // Convert the document to HTML.
    HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
    // Unlink table of contents.
    viewOptions.getWordProcessingOptions().setUnlinkTableOfContents(true);
    viewer.view(viewOptions);
}

The following image illustrates the result:

Unlink table of contents in Word documents

Introduced new performance-oriented conversion mode for CAD format family

By default, the GroupDocs.Viewer converts and renders all documents within CAD format family with the max possible quality. In case when the input CAD file (DWG, for example) is very complex, it may lead to quite significant processing time. Also, the size of the generated output HTML or image (vector or raster) also may be too heavy.

Starting from the version 24.8 the GroupDocs.Viewer introduces a new public property within the CadOptions class — the setEnablePerformanceConversionMode(...) boolean flag. By default it is set to false - the GroupDocs.Viewer behaves as in previous versions, preserving the maximum quality. But when setting its value to true, then the performance-oriented conversion mode is enabled, which leads to significantly lesser conversion time as well as lesser byte size of the output document.

Enabling this mode is pretty simple — just create an instance of the CadOptions class by using any of the CadOptions factory methods, and then set the value for the setEnablePerformanceConversionMode(...) property. Example is below:

try (Viewer viewer = new Viewer("input.dwg")) {
   HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources("Output-Page#{0}.html");                    
   viewOptions.setCadOptions(CadOptions.forRenderingByWidth(1000));
   viewOptions.getCadOptions().setEnablePerformanceConversionMode(true);

   viewer.view(viewOptions);
}

If taking an ordinary DWG file as a sample, the comparison between “quality” and “performance” modes are the next:

Conversion modeOutput file size, MiBProcessing time, sec
Quality-oriented (default)46.87.87
Performance-oriented (new)5.044.47

Screenshot below illustrates the visual differences between these modes, default quality-oriented mode is on the left side, and the new performance-oriented mode is on the right side:

DWG quality vs. performance