GroupDocs.Viewer for Java 23.7 Release Notes
There are 14 features and bug fixes in this release.
Full list of changes in this release
Key | Summary | Category |
---|---|---|
VIEWERNET‑4064 | Feature | Set page size when rendering Web documents |
VIEWERNET‑2692 | Fix | Out of memory exception thrown when rendering MD file to PNG/JPG in Linux |
VIEWERNET‑3367 | Fix | Exception Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index when opening CGM-file. |
VIEWERNET‑3498 | Fix | “Could not load file. File is corrupted or damaged.” exception when rendering DWF file |
VIEWERNET‑3588 | Fix | “Index was out of range. Must be non-negative and less than the size of the collection. (Parameter ‘startIndex’)” exception when rendering NUMBERS file |
VIEWERNET‑3597 | Fix | UpdateSize produces wrong size for specific DWG document |
VIEWERNET‑3601 | Fix | Table border is not correct when converting certain DOCX to HTML in .NET |
VIEWERNET‑3739 | Fix | Temp files are not removed when Viewer fails to load CDR |
VIEWERNET‑3820 | Fix | “Could not load file. File is corrupted or damaged.” exception when rendering ODT file |
VIEWERNET‑3874 | Fix | “Could not load file. File is corrupted or damaged.” exception when rendering ODT file |
VIEWERNET‑3916 | Fix | Cannot open RAR5 encrypted file in .NET 6 |
VIEWERNET‑3967 | Fix | Size options were not applied when converting CAD documents |
VIEWERNET‑4000 | Fix | Saving a particular pdf document to image by page produces distored images |
VIEWERNET‑4117 | Fix | DXF Image loading failed |
Public API and backward incompatible changes
To simplify and clarify the API, we have separated the web document rendering options into the WebDocumentOptions class. In previous versions, you had to use the WordProcessingOptions class, which was not intuitive.
public class WebDocumentOptions {
public WebDocumentOptions() {
// Implementation
}
public PageSize getPageSize() {
// Implementation
}
public void setPageSize(PageSize pageSize) {
// Implementation
}
public float getLeftMargin() {
// Implementation
}
public void setLeftMargin(float leftMargin) {
// Implementation
}
public float getRightMargin() {
// Implementation
}
public void setRightMargin(float rightMargin) {
// Implementation
}
public float getTopMargin() {
// Implementation
}
public void setTopMargin(float topMargin) {
// Implementation
}
public float getBottomMargin() {
// Implementation
}
public void setBottomMargin(float bottomMargin) {
// Implementation
}
}
The following code snippet demonstrates how to set Web document options when rendering HTML file to PDF:
try (Viewer viewer = new Viewer("Invoice.htm")) {
// Create a PDF file for with page size set to A3 1190 x 842 points.
PdfViewOptions viewOptions = new PdfViewOptions("output.pdf");
viewOptions.getWebDocumentOptions().setPageSize(PageSize.A3);
viewer.view(viewOptions);
}