GroupDocs.Viewer for Java 24.10 Release Notes
Full list of changes in this release
Key | Category | Summary |
---|---|---|
VIEWERNET‑4099 | Feature | Support tiled rendering when converting CAD to PDF |
VIEWERNET‑4747 | Feature | Add JFIF (.jfif) file type as supported |
VIEWERNET‑4625 | Feature | Preserve PDF copy protection when rendering to HTML |
VIEWERNET‑3417 | Feature | Add support for Adobe Illustrator Encapsulated PostScript (EPS) files |
VIEWERNET‑4376 | Feature | Render presentations as pure HTML |
VIEWERNET‑4874 | Feature | Add support for repairing PDF documents |
VIEWERNET‑4759 | Enhancement | Improve Markdown files rendering quality |
VIEWERNET‑3333 | Enhancement | Reduce output size when rendering large CAD drawings |
VIEWERNET‑4761 | Enhancement | Eliminate or rename global styles from resultant HTML when viewing Spreadsheet files |
VIEWERNET‑4746 | Fix | "Incorrect message format specified in the options: Msg" error during call viewer.view for the MSG file. |
VIEWERNET‑3449 | Fix | “Failed to open presentation with error: Empty content in the AlternateContent” exception when rendering PPTX file |
VIEWERNET‑3817 | Fix | Make readable exception for specific invalid TEX file |
VIEWERNET‑2854 | Fix | Cannot convert a DWG file when license is not applied |
VIEWERNET‑4738 | Fix | Null reference exception when calling getViewInfo for Excel file |
VIEWERNET‑4434 | Fix | Font display issue |
VIEWERNET‑3803 | Fix | Output bitmap cannot be created when rendering MPP on Linux |
VIEWERNET‑4785 | Fix | Cannot load corrupted or damaged MSG with attachment with GroupDocsViewerException is thrown |
VIEWERNET‑4794 | Fix | Out of memory exception on Linux |
VIEWERNET‑4792 | Fix | Images are not in the right place |
VIEWERNET‑4784 | Fix | Word With Table - Viewing problem |
VIEWERNET‑4789 | Fix | Excel files Display Problem |
VIEWERNET‑3930 | Fix | Image rendering issue from DOCX to HTML |
VIEWERNET‑3268 | Fix | “Could not load file. File is corrupted or damaged.” exception when rendering AI file |
VIEWERNET‑3609 | Fix | “Could not load file. File is corrupted or damaged.” exception when rendering AI file |
VIEWERNET‑2551 | Fix | “Image export failed” exception when rendering PSD file |
VIEWERNET‑3418 | Fix | “Could not load file. File is corrupted or damaged.” exception when rendering AI file |
VIEWERNET‑4480 | Fix | The object reference is not set to an instance of the object exception when processing certain PDF files |
VIEWERNET‑4756 | Fix | Investigate and fix issue with saving SVG to PNG |
VIEWERNET‑4832 | Fix | Reason for CorruptedOrDamagedFileException |
VIEWERNET‑4838 | Fix | Wrong page size for vector images |
VIEWERNET‑4866 | Fix | Unable to View big files in Groupdocs Viewer version 20.8 |
VIEWERNET‑4868 | Fix | Fix a bug with missing image resource which occurs only on Linux |
VIEWERNET‑4872 | Fix | Null reference exception when rendering DOCX to HTML |
VIEWERNET‑4826 | Fix | Converting certain PDF to HTML/PNG produces some artifacts |
VIEWERNET‑4788 | Fix | Converting certain DWG to PNG is super slow |
VIEWERJAVA‑410 | Fix | API consumes a lot of memory and generates OutOfMemoryError |
VIEWERJAVA‑3038 | Fix | setEndDate method does not work when rendering to single page is disabled |
VIEWERJAVA‑3039 | Fix | Conflict between GroupDocs.Viewer and Aspose.Tasks v23.1 when user use them in the same project |
VIEWERJAVA‑3086 | Fix | Java heap space or thread timeout exception is thrown when viewing IFC document |
Major Features
This release includes the following features:
- Support tiled rendering when converting CAD to PDF
- Reduce output size when rendering large CAD drawings
- Added JFIF file type as supported
Support tiled rendering when converting CAD to PDF
This release adds support for rendering CAD drawings to a tiles when converting to PDF. Check Split a drawing into tiles documentation topic for more details and code snippet.
Reduce output size when rendering large CAD drawings
To reduce output image, HTML or PDF size when rendering complex CAD drawings you can set CadOptions.setEnablePerformanceConversionMode(...)
to true
to reduce output quality and speed up rendering. See details at Choose rendering speed instead of quality documentation topic.
Added JFIF file type as supported
JPEG File Interchange Format (.jfif) is image that was developed for fast exchange between platforms. This format uses JPEG compression. Learn more about this file format here. See Supported file formats documentation topic for all supported formats.
Preserve PDF copy protection when rendering to HTML
When rendering PDF files with protection against copying text and images to HTML, GroupDocs.Viewer adds an inert
HTML attribute to the HTML <body>
tag.
Use PdfOptions.setDisableCopyProtection(…) to turn off copy protection. When setDisableCopyProtection(...)
is set to true
, the inert
HTML attribute won’t be added to the HTML <body>
tag in any case.
inert
HTML attribute to HTML <body>
tag.This option is supported when rendering PDF files to HTML with embedded or external resources.
try (Viewer viewer = new Viewer("protected-resume.pdf")) {
HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
viewOptions.getPdfOptions().setDisableCopyProtection(true);
viewer.view(viewOptions);
}
The following image shows the rendering of protected-resume.pdf with copy protection on the left and with setDisableCopyProtection(...)
option set to true
on the right:
Render Adobe Illustrator Encapsulated PostScript (EPS) files
File extension: .ai
.
File structure: Differs from standard AI files. EPS files typically have a %!PS-Adobe-3.0 EPSF
file header, which you can see by opening the file in a text editor.
Learn more: For more information on the differences between AI and EPS formats, see the Adobe article: Comparison of AI and EPS file formats.
Render presentations as pure HTML
Before this version 24.10, the GroupDocs.Viewer for Java was able to render presentations to the HTML in only one mode, which is heavily based on SVG images. Actually, the whole slide is converted to a single vector image in SVG format, and the HTML here is served only as a wrapper around the SVG element. This mode has an undeniable advantage of 100% accurate reproduction of the original presentation. In other words, what you see in MS PowerPoint when opening a presentation, this is exactly what you see in the web-browser after opening the same presentation in the GroupDocs.Viewer. This is possible because GroupDocs.Viewer scans the original presentation document and reproduces it by drawing every tiny element, every pixel on SVG canvas while preserving the position, shape and orientation.
But because of its SVG-based nature this mode also has the disadvantages — the SVG markup is too complex, full-text search may not work as expected, and, actually, this is not the “real” HTML and CSS-markup. So if you want to implement something like modification or post-processing the document after obtaining it from GroupDocs.Viewer, you may encounter troubles, because standard tools like HTML parsers or CSS queries usually are not working with SVG markup.
That’s why we represent the new HTML conversion mode for the Presentations — pure HTML/CSS mode. In this mode no SVG images are generated at all, only pure HTML and CSS markup.
By default, this mode is disabled, and the existing SVG-based mode is activated. For enabling the new pure HTML/CSS conversion mode, please set the boolean flag setRenderToPureHtml(...)
to true
value in the PresentationOptions
property of the HtmlViewOptions
class.
Code example below shows converting the same presentation file to the pure HTML/CSS markup in two variations — with embedded and external resources:
String inputPresentationPath = "SamplePresentation.pptx";
//preparing HTML options for embedded and external resources
HtmlViewOptions embeddedOptions = HtmlViewOptions.forEmbeddedResources("slide_{0}_embedded.html");
HtmlViewOptions externalOptions = HtmlViewOptions.forExternalResources("slide_{0}.html", "slide_{0}_{1}", "slide_{0}_{1}");
//enabling the pure HTML/CSS mode for both options
embeddedOptions.getPresentationOptions().setRenderToPureHtml(true);
externalOptions.getPresentationOptions().setRenderToPureHtml(true);
try (Viewer viewer = new Viewer(inputPresentationPath)) {
viewer.view(embeddedOptions);
viewer.view(externalOptions);
}
Need to mention that this new pure HTML/CSS mode also has the next limitations and disadvantages:
- Its fidelity is generally worse compared to the original SVG-based mode, especially on presentations with complex slides layout and sophisticated text formatting.
- For this moment rendering comments and notes are not supported, so the setRenderComments(…) and setRenderNotes(…) properties of the
HtmlViewOptions
class are ignored. - setResolution(…) property of the PresentationOptions class is also not supported for this moment, the images are exported to the output HTML document in their original resolution.
- setRenderToSinglePage(…) boolean property of the
HtmlViewOptions
class is not supported too, so every slide of the presentation will be saved to the distinct HTML document. - setRenderResponsive(…) boolean property of
HtmlViewOptions
class belongs to the existing SVG-based conversion mode, so its value is ignored while converting in pure HTML/CSS mode, — HTML and CSS-markup are already 100% responsive.
We plan to add support for most of these missing features in the near future by constantly improving this new pure HTML/CSS converter, adding new features and fixing bugs.
Repairing corrupted PDF documents
By default, GroupDocs.Viewer cannot process the PDF documents with corrupted structure or content — it throws an exception when trying to open such files. However, starting from this version 24.10 GroupDocs.Viewer can try to repair the structural corruptions in PDF documents. By default, this feature is disabled. To enable it, need to use the newly added setTryRepair(…) boolean property of the LoadOptions
class by setting its value to true
.
When enabled, this feature addresses the following issues in a PDF document:
- Broken references within the document (incorrect object offsets in the Cross-reference list).
- Missing critical elements like root object, page object, or page content.
- Circular references (Form X-object referencing itself).
Here is a source code sample:
LoadOptions loadOptions = new LoadOptions();
loadOptions.setTryRepair(true);
PngViewOptions viewOptions = new PngViewOptions();
try (Viewer viewer = new Viewer("resume.pdf", loadOptions)) {
viewer.view(viewOptions);
}