Added option to show spreadsheet column headings and row numbers, see How to show spreadsheet column and row headings for more details.
NOTE: This feature is supported when rendering worksheets into a single page when SpreadsheetOptions is set to SpreadsheetOptions.forOnePagePerSheet().
When converting CAD drawings to HTML, CAD drawings are converted to SVG instead of PNG
Related articleHow to convert CAD to HTML
classPdfOptions{/*
* When this option enabled the output pages will have the same size
* in pixels as page size in a source PDF document.
* By default GroupDocs.Viewer calculates output image page size for better rendering quality.
* Note: This option is supported when rendering into PNG or JPG formats.
*/voidsetEnableFontHinting(booleanvalue)booleanisRenderOriginalPageSize()}
Changes in FileType class
New constants and methods were added to FileType class.
enumFileType{/*
* Gnu Zipped File (.gz)
*/GZ("Gnu Zipped File",".gz")/*
* Gnu Zipped File (.gzip)
*/GZIP("Gnu Zipped File",".gzip")/*
* Microsoft Excel Template (.xlt)
*/XLT("Microsoft Excel Template",".xlt")/*
* Roshal ARchive (.rar) are compressed files generated using the RAR (WINRAR version 4) compression method.
*/RAR("Rar Compressed File",".rar")/*
* Excel 2003 XML (SpreadsheetML) represents Excel Binary File Format.
* Such files can be created by Microsoft Excel as well as other similar spreadsheet programs such as OpenOffice Calc or Apple Numbers.
*/EXCEL_2003_XML("Excel 2003 XML (SpreadsheetML)",".xml")/*
* Apple numbers represent Excel-like Binary File Format. Such files can be created by Apple numbers application.
*/NUMBERS("Apple numbers",".numbers")/*
* Maps file media type to file type e.g. 'application/pdf' will be mapped to `FileType.PDF`/>.
* If `null` or `empty` was passed, it returns `FileType.Unknown` file type
* @param mediaType File media type e.g. application/pdf.
* @return corresponding media type when found, otherwise returns default `UNKNOWN` file type.
*/FileTypefromMediaType(StringmediaType)/*
* This method now accepts `null` or `empty` string and returns `FileType.Unknown` file type instead of throwing `InvalidArgumentException`.
*/FileTypefromExtension(String)/*
* Detects file type by reading the file signature.
* @param source The file stream.
* @return Returns file type in case it was detected successfully otherwise returns default `FileType.Unknown` file type.
*/FileTypefromStream(InputStreamsource)/*
* Detects file type by reading the file signature.
* @param source The file stream.
* @param password The password to open the file.
* @return Returns file type in case it was detected successfully otherwise returns default `FileType.Unknown` file type.
*/FileTypefromStream(InputStreamsource,Stringpassword)}
classArchiveOptions{/*
* Methods were added to display in the header. By default, the name of the source file is displayed.
*/FileNamegetFileName()voidsetFileName(FileNamefileName)/*
* Methods were added to specify the number of records per page (for rendering to HTML only)
*/intgetItemsPerPage()voidsetItemsPerPage(int)}
Added FileName class
Class FileName was added to represent the name of the file.
classFileName{/**
* The empty filename.
*/staticEMPTY("<empty>")/**
* The name of the source file.
*/staticSOURCE("<source>")/**
* Initializes new instance of FileName class.
*
* @param fileName The name of the file.
*/publicFileName(StringfileName)/**
* Returns a string that represents the current object.
*/StringtoString()}
classViewer{/*
* Method was set as deprecated. And will removed in future releases. Please switch to the method that accepts Attachment as a first parameter.
*/voidsaveAttachment(StringattachmentId,OutputStreamdestination)/*
* Method added to save attachment file to the destination stream.
* @param attachment The attachment.
* @param destination The writable stream.
*/voidsaveAttachment(Attachmentattachment,OutputStreamdestination)/*
* Added new method to support checking if file is encrypted or not.
* Returns information about file such as file-type and flag that indicates if file is encrypted.
*/FileInfogetFileInfo()}
classSpreadsheetOptions{/*
* Enables headings rendering.
*/booleanisRenderHeadings()voidsetRenderHeadings(booleanrender)/*
* Initializes new instance of `SpreadsheetOptions` for rendering sheet into pages.
* @param countRowsPerPage Rows count to include into each page.
* @param countColumnsPerPage Columns count to include into each page.
*/SpreadsheetOptionsforSplitSheetIntoPages(intcountRowsPerPage,intcountColumnsPerPage)/*
* The method was added to support partial rendering of Excel spreadsheets by splitting worksheets into pages by rows and columns.
* The columns count to include into each page when splitting worksheet into pages.
*/intgetCountColumnsPerPage()}
Added FileInfo class
Class FileInfo was added to support checking if file is encrypted or not.
/*
* Contains information about file.
*/classFileInfo{/*
* The type of the file.
*/FileTypegetFileType()/*
* Indicates that file is encrypted.
*/booleanisEncrypted()voidsetEncrypted(boolean)/*
* Returns a string that represents the current object.
*/StringtoString()}
classHtmlViewOptions{/*
* Methods were added to support rendering text files to a single page
* Enables HTML content will be rendered to single page
*/booleanisRenderSinglePage()voidsetRenderSinglePage(boolean)}
Class ViewInfo was renamed to ViewInfoImpl and from it was extracted interface ViewInfo
Class Word was renamed to WordImpl and from it was extracted interface Word
This changes were made to implement possibility to use custom serialization functionality with caching. More details you can find in Using Custom model classes for caching
It is better to use CacheableFactory.getInstance().newCadViewInfo(...), CacheableFactory.getInstance().newWord(...) and so on to create new instances of classes above. But if you are not going to use custom serialization, you can still use new CadViewInfoImpl(...), new WordImpl(...), …
Behavior changes
Starting from 21.2 the CAD drawings are converted to SVG instead of PNG for better quality. Please refer to How to convert CAD to HTML article for more details.
In this version we’ve improved viewing of archives and text files - now it could be rendered to multiple and single pages (by default they are rendered to multiple pages). See How to convert archive files and How to convert and view TXT files for more details.
In this version we’ve improved viewing of Personal Storage OST/PST files and as a result, the behavior changed. Now when viewing personal storage OST /PST files the Inbox folder is selected and displayed by default as it shown on the screenshot below.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.