From 663ebde3a872db0a8376f2daa16d995004c44949 Mon Sep 17 00:00:00 2001 From: yevgen-nykytenko Date: Thu, 7 Mar 2024 05:13:31 -0600 Subject: [PATCH] Update content 2024-03-07 05:13:31 --- english/nodejs-java/_index.md | 19 + .../_index.md | 24 + .../cacheablefactory/_index.md | 555 ++++ .../com.groupdocs.viewer.caching/_index.md | 36 + .../cache/_index.md | 92 + .../cachekeys/_index.md | 163 ++ .../filecache/_index.md | 186 ++ .../com.groupdocs.viewer.fonts/_index.md | 41 + .../folderfontsource/_index.md | 172 ++ .../fontsettings/_index.md | 63 + .../fontsource/_index.md | 16 + .../searchoption/_index.md | 80 + .../com.groupdocs.viewer.logging/_index.md | 30 + .../filelogger/_index.md | 266 ++ .../viewerlogger/_index.md | 242 ++ .../com.groupdocs.viewer.options/_index.md | 67 + .../archiveoptions/_index.md | 128 + .../archivesecurityoptions/_index.md | 170 ++ .../baseviewoptions/_index.md | 480 +++ .../cadoptions/_index.md | 409 +++ .../emailoptions/_index.md | 247 ++ .../field/_index.md | 523 ++++ .../filename/_index.md | 100 + .../htmlviewoptions/_index.md | 583 ++++ .../imagequality/_index.md | 94 + .../jpgviewoptions/_index.md | 321 ++ .../loadoptions/_index.md | 411 +++ .../mailstorageoptions/_index.md | 133 + .../outlookoptions/_index.md | 154 + .../pagesize/_index.md | 139 + .../pdfoptions/_index.md | 266 ++ .../pdfviewoptions/_index.md | 371 +++ .../permissions/_index.md | 94 + .../pngviewoptions/_index.md | 289 ++ .../position/_index.md | 134 + .../projectmanagementoptions/_index.md | 158 + .../rotation/_index.md | 95 + .../security/_index.md | 131 + .../size/_index.md | 100 + .../spreadsheetoptions/_index.md | 490 ++++ .../textoptions/_index.md | 108 + .../textoverflowmode/_index.md | 104 + .../tile/_index.md | 126 + .../timeunit/_index.md | 103 + .../viewinfooptions/_index.md | 294 ++ .../viewoptions/_index.md | 102 + .../visiorenderingoptions/_index.md | 101 + .../watermark/_index.md | 210 ++ .../wordprocessingoptions/_index.md | 318 ++ .../com.groupdocs.viewer.results/_index.md | 51 + .../archiveviewinfo/_index.md | 46 + .../attachment/_index.md | 87 + .../cadviewinfo/_index.md | 57 + .../character/_index.md | 33 + .../fileinfo/_index.md | 68 + .../layer/_index.md | 79 + .../layout/_index.md | 86 + .../line/_index.md | 48 + .../lotusnotesviewinfo/_index.md | 45 + .../outlookviewinfo/_index.md | 45 + .../page/_index.md | 103 + .../pdfviewinfo/_index.md | 45 + .../projectmanagementviewinfo/_index.md | 56 + .../resource/_index.md | 93 + .../textelement/_index.md | 75 + .../viewinfo/_index.md | 57 + .../word/_index.md | 48 + .../com.groupdocs.viewer.utils/_index.md | 30 + .../memorycleaner/_index.md | 110 + .../pathutils/_index.md | 62 + .../com.groupdocs.viewer/_index.md | 37 + .../com.groupdocs.viewer/filetype/_index.md | 2594 +++++++++++++++++ .../com.groupdocs.viewer/license/_index.md | 142 + .../com.groupdocs.viewer/metered/_index.md | 121 + .../com.groupdocs.viewer/viewer/_index.md | 755 +++++ .../viewersettings/_index.md | 140 + 76 files changed, 14651 insertions(+) create mode 100644 english/nodejs-java/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.caching.extra/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.caching.extra/cacheablefactory/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.caching/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.caching/cache/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.caching/cachekeys/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.caching/filecache/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.fonts/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.fonts/folderfontsource/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.fonts/fontsettings/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.fonts/fontsource/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.fonts/searchoption/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.logging/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.logging/filelogger/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.logging/viewerlogger/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/archiveoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/archivesecurityoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/baseviewoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/cadoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/emailoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/field/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/filename/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/htmlviewoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/imagequality/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/jpgviewoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/loadoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/mailstorageoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/outlookoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/pagesize/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/pdfoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/pdfviewoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/permissions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/pngviewoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/position/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/projectmanagementoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/rotation/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/security/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/size/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/textoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/textoverflowmode/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/tile/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/timeunit/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/viewinfooptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/viewoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/visiorenderingoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/watermark/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.options/wordprocessingoptions/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/archiveviewinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/attachment/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/cadviewinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/character/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/fileinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/layer/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/layout/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/line/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/lotusnotesviewinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/outlookviewinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/page/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/pdfviewinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/projectmanagementviewinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/resource/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/textelement/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/viewinfo/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.results/word/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.utils/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.utils/memorycleaner/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer.utils/pathutils/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer/filetype/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer/license/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer/metered/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer/viewer/_index.md create mode 100644 english/nodejs-java/com.groupdocs.viewer/viewersettings/_index.md diff --git a/english/nodejs-java/_index.md b/english/nodejs-java/_index.md new file mode 100644 index 00000000..d53bd771 --- /dev/null +++ b/english/nodejs-java/_index.md @@ -0,0 +1,19 @@ +--- +title: GroupDocs.Viewer for Node.js via Java +type: docs +weight: 11 +url: /nodejs-java/ +description: GroupDocs.Viewer for Node.js via Java API References contain examples, code snippets, and API documentation. It provides packages, classes, interfaces, and other API details. +is_root: true +--- +## Packages +| Package | Description | +| --- | --- | +| [com.groupdocs.viewer](./com.groupdocs.viewer) | The package provides classes for rendering documents in HTML5, Image, or PDF modes with fast and high-quality results. | +| [com.groupdocs.viewer.caching](./com.groupdocs.viewer.caching) | The package provides classes for customizing caching behavior. | +| [com.groupdocs.viewer.caching.extra](./com.groupdocs.viewer.caching.extra) | The package provides functionality for using custom models in cache implementation. | +| [com.groupdocs.viewer.fonts](./com.groupdocs.viewer.fonts) | The package provides classes and enumerations to manage fonts used during the rendering process. | +| [com.groupdocs.viewer.logging](./com.groupdocs.viewer.logging) | The package provides classes for configuring the logging system in GroupDocs.Viewer. | +| [com.groupdocs.viewer.options](./com.groupdocs.viewer.options) | The package provides classes to specify additional options when rendering documents. | +| [com.groupdocs.viewer.results](./com.groupdocs.viewer.results) | The package provides classes and interfaces that represent document rendering results. | +| [com.groupdocs.viewer.utils](./com.groupdocs.viewer.utils) | The package provides helper and utility classes for various functionalities. | diff --git a/english/nodejs-java/com.groupdocs.viewer.caching.extra/_index.md b/english/nodejs-java/com.groupdocs.viewer.caching.extra/_index.md new file mode 100644 index 00000000..38efe7e3 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.caching.extra/_index.md @@ -0,0 +1,24 @@ +--- +title: com.groupdocs.viewer.caching.extra +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides functionality for using custom models in cache implementation. +type: docs +weight: 12 +url: /nodejs-java/com.groupdocs.viewer.caching.extra/ +--- + +The package provides functionality for using custom models in cache implementation. + +The main class in this package is [CacheableFactory](../../com.groupdocs.viewer.caching.extra/cacheablefactory), which helps in customizing the cache by providing additional functionality. + +For more details on using custom models in cache implementation in GroupDocs.Viewer, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [CacheableFactory](../com.groupdocs.viewer.caching.extra/cacheablefactory) | This class helps customize [Cache](../com.groupdocs.viewer.caching/cache). | diff --git a/english/nodejs-java/com.groupdocs.viewer.caching.extra/cacheablefactory/_index.md b/english/nodejs-java/com.groupdocs.viewer.caching.extra/cacheablefactory/_index.md new file mode 100644 index 00000000..c4fc99f8 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.caching.extra/cacheablefactory/_index.md @@ -0,0 +1,555 @@ +--- +title: CacheableFactory +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: This class helps customize . +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer.caching.extra/cacheablefactory/ +--- +**Inheritance:** +java.lang.Object +``` +public class CacheableFactory +``` + +This class helps customize [Cache](../../com.groupdocs.viewer.caching/cache). + +Custom models for serialization can be implemented by overriding methods in this class to return them instead of the embedded ones. To achieve this, extend CacheableFactory and activate it passing new instance of custom factory to [setInstance(CacheableFactory)](../../com.groupdocs.viewer.caching.extra/cacheablefactory\#setInstance-CacheableFactory-) method. + +Example usage: + +``` + + CacheableFactory.setInstance(new YourCustomCacheableFactory()); + // Custom cacheable factory is now in use. You can start rendering documents. + +``` + +For more details, guidelines, and examples on customizing the cache, please refer to the [GroupDocs.Viewer documentation][]. + + +[GroupDocs.Viewer documentation]: https://docs.groupdocs.com/viewer/java/getting-started/ +## Constructors + +| Constructor | Description | +| --- | --- | +| [CacheableFactory()](#CacheableFactory--) | | +## Methods + +| Method | Description | +| --- | --- | +| [getInstance()](#getInstance--) | Gets an instance of CacheableFactory that can be used to create cacheable objects. | +| [setInstance(CacheableFactory instance)](#setInstance-com.groupdocs.viewer.caching.extra.CacheableFactory-) | Sets the instance of CacheableFactory to be used. | +| [newViewInfo(FileType fileType, List pages)](#newViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--) | Creates an implementation of the [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) interface for the specified file type and pages. | +| [newLotusNotesViewInfo(FileType fileType, List pages, int notesCount)](#newLotusNotesViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--int-) | Creates an implementation of the [LotusNotesViewInfo](../../com.groupdocs.viewer.results/lotusnotesviewinfo) interface for the specified file type, pages, and notes count. | +| [newArchiveViewInfo(FileType fileType, List pages, List folders)](#newArchiveViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.List-java.lang.String--) | Creates an implementation of the [ArchiveViewInfo](../../com.groupdocs.viewer.results/archiveviewinfo) interface for the specified file type, pages, and folders. | +| [newCharacter(char character, double x, double y, double width, double height)](#newCharacter-char-double-double-double-double-) | Creates an implementation of the [Character](../../com.groupdocs.viewer.results/character) interface for the specified character, position, and dimensions. | +| [newFileInfo(FileType fileType)](#newFileInfo-com.groupdocs.viewer.FileType-) | Creates an implementation of the [FileInfo](../../com.groupdocs.viewer.results/fileinfo) interface for the specified file type. | +| [newLayer(String name, boolean visible)](#newLayer-java.lang.String-boolean-) | Creates an implementation of the [Layer](../../com.groupdocs.viewer.results/layer) interface with the specified name and visibility. | +| [newLayer(String name)](#newLayer-java.lang.String-) | Creates an implementation of the [Layer](../../com.groupdocs.viewer.results/layer) interface with the specified name. | +| [newLayout(String name, double width, double height)](#newLayout-java.lang.String-double-double-) | Creates an implementation of the [Layout](../../com.groupdocs.viewer.results/layout) interface with the specified name, width, and height. | +| [newLine(String line, double x, double y, double width, double height, List words)](#newLine-java.lang.String-double-double-double-double-java.util.List-com.groupdocs.viewer.results.Word--) | Creates an implementation of the [Line](../../com.groupdocs.viewer.results/line) interface with the specified line, position, dimensions, and words. | +| [newAttachment(String fileName, String filePath)](#newAttachment-java.lang.String-java.lang.String-) | Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. | +| [newAttachment(String id, String fileName, String filePath, long size)](#newAttachment-java.lang.String-java.lang.String-java.lang.String-long-) | Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. | +| [newAttachment(String id, String fileName, Path filePath, long size)](#newAttachment-java.lang.String-java.lang.String-java.nio.file.Path-long-) | Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. | +| [newAttachment(String id, String fileName, String filePath, FileType fileType, long size)](#newAttachment-java.lang.String-java.lang.String-java.lang.String-com.groupdocs.viewer.FileType-long-) | Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. | +| [newOutlookViewInfo(FileType fileType, List pages, List folders)](#newOutlookViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.List-java.lang.String--) | Creates an implementation of the [OutlookViewInfo](../../com.groupdocs.viewer.results/outlookviewinfo) interface based on the specified file type, list of pages, and list of folders. | +| [newPage(int number, boolean visible)](#newPage-int-boolean-) | Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number and visibility. | +| [newPage(int number, String name, boolean visible)](#newPage-int-java.lang.String-boolean-) | Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, name, and visibility. | +| [newPage(int number, String name, boolean visible, int width, int height)](#newPage-int-java.lang.String-boolean-int-int-) | Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, name, visibility, width, and height. | +| [newPage(int number, boolean visible, int width, int height)](#newPage-int-boolean-int-int-) | Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, visibility, width, and height. | +| [newPage(int number, String name, boolean visible, int width, int height, List lines)](#newPage-int-java.lang.String-boolean-int-int-java.util.List-com.groupdocs.viewer.results.Line--) | Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, name, visibility, width, height, and lines. | +| [newPage(int number, boolean visible, int width, int height, List lines)](#newPage-int-boolean-int-int-java.util.List-com.groupdocs.viewer.results.Line--) | Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, visibility, width, height, and lines. | +| [newPdfViewInfo(FileType fileType, List pages, boolean printingAllowed)](#newPdfViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--boolean-) | Creates an implementation of the [PdfViewInfo](../../com.groupdocs.viewer.results/pdfviewinfo) interface with the specified file type, pages, and printing allowed flag. | +| [newCadViewInfo(FileType fileType, List pages, List layers, List layouts)](#newCadViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.List-com.groupdocs.viewer.results.Layer--java.util.List-com.groupdocs.viewer.results.Layout--) | Creates an implementation of the [CadViewInfo](../../com.groupdocs.viewer.results/cadviewinfo) interface with the specified file type, pages, layers, and layouts. | +| [newProjectManagementViewInfo(FileType fileType, List pages, Date startDate, Date endDate)](#newProjectManagementViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.Date-java.util.Date-) | Creates an implementation of the [ProjectManagementViewInfo](../../com.groupdocs.viewer.results/projectmanagementviewinfo) interface with the specified file type, pages, start date, and end date. | +| [newTextElement(T value, double x, double y, double width, double height)](#-T-newTextElement-T-double-double-double-double-) | Creates an implementation of the [TextElement](../../com.groupdocs.viewer.results/textelement) interface with the specified value, coordinates, and dimensions. | +| [newMboxViewInfo(FileType fileType, List pages, int notesCount)](#newMboxViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--int-) | Creates an implementation of the MboxViewInfo interface with the specified file type, pages, and notes count. | +| [newWord(String word, double x, double y, double width, double height, List characters)](#newWord-java.lang.String-double-double-double-double-java.util.List-com.groupdocs.viewer.results.Character--) | Creates an implementation of the [Word](../../com.groupdocs.viewer.results/word) interface with the specified word, coordinates, dimensions, and characters. | +### CacheableFactory() {#CacheableFactory--} +``` +public CacheableFactory() +``` + + +### getInstance() {#getInstance--} +``` +public static CacheableFactory getInstance() +``` + + +Gets an instance of CacheableFactory that can be used to create cacheable objects. + +**Returns:** +[CacheableFactory](../../com.groupdocs.viewer.caching.extra/cacheablefactory) - an instance of CacheableFactory . +### setInstance(CacheableFactory instance) {#setInstance-com.groupdocs.viewer.caching.extra.CacheableFactory-} +``` +public static void setInstance(CacheableFactory instance) +``` + + +Sets the instance of CacheableFactory to be used. This allows custom implementation of the cacheable factory. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| instance | [CacheableFactory](../../com.groupdocs.viewer.caching.extra/cacheablefactory) | The instance of CacheableFactory to set. | + +### newViewInfo(FileType fileType, List pages) {#newViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--} +``` +public ViewInfo newViewInfo(FileType fileType, List pages) +``` + + +Creates an implementation of the [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) interface for the specified file type and pages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | +| pages | java.util.List | The list of pages representing the document pages. | + +**Returns:** +[ViewInfo](../../com.groupdocs.viewer.results/viewinfo) - a new instance of the [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) implementation. +### newLotusNotesViewInfo(FileType fileType, List pages, int notesCount) {#newLotusNotesViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--int-} +``` +public LotusNotesViewInfo newLotusNotesViewInfo(FileType fileType, List pages, int notesCount) +``` + + +Creates an implementation of the [LotusNotesViewInfo](../../com.groupdocs.viewer.results/lotusnotesviewinfo) interface for the specified file type, pages, and notes count. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | +| pages | java.util.List | The list of pages representing the document pages. | +| notesCount | int | The count of Lotus Notes in the document. | + +**Returns:** +[LotusNotesViewInfo](../../com.groupdocs.viewer.results/lotusnotesviewinfo) - a new instance of the [LotusNotesViewInfo](../../com.groupdocs.viewer.results/lotusnotesviewinfo) implementation. +### newArchiveViewInfo(FileType fileType, List pages, List folders) {#newArchiveViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.List-java.lang.String--} +``` +public ArchiveViewInfo newArchiveViewInfo(FileType fileType, List pages, List folders) +``` + + +Creates an implementation of the [ArchiveViewInfo](../../com.groupdocs.viewer.results/archiveviewinfo) interface for the specified file type, pages, and folders. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | +| pages | java.util.List | The list of pages representing the document pages. | +| folders | java.util.List | The list of folders in the archive. | + +**Returns:** +[ArchiveViewInfo](../../com.groupdocs.viewer.results/archiveviewinfo) - a new instance of the [ArchiveViewInfo](../../com.groupdocs.viewer.results/archiveviewinfo) implementation. +### newCharacter(char character, double x, double y, double width, double height) {#newCharacter-char-double-double-double-double-} +``` +public Character newCharacter(char character, double x, double y, double width, double height) +``` + + +Creates an implementation of the [Character](../../com.groupdocs.viewer.results/character) interface for the specified character, position, and dimensions. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| character | char | The character. | +| x | double | The x-coordinate of the character position. | +| y | double | The y-coordinate of the character position. | +| width | double | The width of the character. | +| height | double | The height of the character. | + +**Returns:** +[Character](../../com.groupdocs.viewer.results/character) - a new instance of the [Character](../../com.groupdocs.viewer.results/character) implementation. +### newFileInfo(FileType fileType) {#newFileInfo-com.groupdocs.viewer.FileType-} +``` +public FileInfo newFileInfo(FileType fileType) +``` + + +Creates an implementation of the [FileInfo](../../com.groupdocs.viewer.results/fileinfo) interface for the specified file type. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | + +**Returns:** +[FileInfo](../../com.groupdocs.viewer.results/fileinfo) - a new instance of the [FileInfo](../../com.groupdocs.viewer.results/fileinfo) implementation. +### newLayer(String name, boolean visible) {#newLayer-java.lang.String-boolean-} +``` +public Layer newLayer(String name, boolean visible) +``` + + +Creates an implementation of the [Layer](../../com.groupdocs.viewer.results/layer) interface with the specified name and visibility. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | The name of the layer. | +| visible | boolean | The visibility of the layer. | + +**Returns:** +[Layer](../../com.groupdocs.viewer.results/layer) - a new instance of the [Layer](../../com.groupdocs.viewer.results/layer) implementation. +### newLayer(String name) {#newLayer-java.lang.String-} +``` +public Layer newLayer(String name) +``` + + +Creates an implementation of the [Layer](../../com.groupdocs.viewer.results/layer) interface with the specified name. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | The name of the layer. | + +**Returns:** +[Layer](../../com.groupdocs.viewer.results/layer) - a new instance of the [Layer](../../com.groupdocs.viewer.results/layer) implementation. +### newLayout(String name, double width, double height) {#newLayout-java.lang.String-double-double-} +``` +public Layout newLayout(String name, double width, double height) +``` + + +Creates an implementation of the [Layout](../../com.groupdocs.viewer.results/layout) interface with the specified name, width, and height. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | The name of the layout. | +| width | double | The width of the layout. | +| height | double | The height of the layout. | + +**Returns:** +[Layout](../../com.groupdocs.viewer.results/layout) - a new instance of the [Layout](../../com.groupdocs.viewer.results/layout) implementation. +### newLine(String line, double x, double y, double width, double height, List words) {#newLine-java.lang.String-double-double-double-double-java.util.List-com.groupdocs.viewer.results.Word--} +``` +public Line newLine(String line, double x, double y, double width, double height, List words) +``` + + +Creates an implementation of the [Line](../../com.groupdocs.viewer.results/line) interface with the specified line, position, dimensions, and words. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| line | java.lang.String | The line content. | +| x | double | The X coordinate of the top-left point of the rectangle that contains the line. | +| y | double | The Y coordinate of the top-left point of the rectangle that contains the line. | +| width | double | The width of the rectangle that contains the line (in pixels). | +| height | double | The height of the rectangle that contains the line (in pixels). | +| words | java.util.List | The words contained in the line. | + +**Returns:** +[Line](../../com.groupdocs.viewer.results/line) - a new instance of the [Line](../../com.groupdocs.viewer.results/line) implementation. +### newAttachment(String fileName, String filePath) {#newAttachment-java.lang.String-java.lang.String-} +``` +public Attachment newAttachment(String fileName, String filePath) +``` + + +Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileName | java.lang.String | The name of the attachment. | +| filePath | java.lang.String | The relative path of the attachment, e.g., "folder/file.docx". When the file is located in the root of an archive, in an email message, or a data file, specify the filename. | + +**Returns:** +[Attachment](../../com.groupdocs.viewer.results/attachment) - a new instance of the [Attachment](../../com.groupdocs.viewer.results/attachment) implementation. +### newAttachment(String id, String fileName, String filePath, long size) {#newAttachment-java.lang.String-java.lang.String-java.lang.String-long-} +``` +public Attachment newAttachment(String id, String fileName, String filePath, long size) +``` + + +Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| id | java.lang.String | The ID of the attachment. | +| fileName | java.lang.String | The name of the attachment. | +| filePath | java.lang.String | The relative path of the attachment, e.g., "folder/file.docx". When the file is located in the root of an archive, in an email message, or a data file, specify the filename. | +| size | long | The size of the attachment. | + +**Returns:** +[Attachment](../../com.groupdocs.viewer.results/attachment) - a new instance of the [Attachment](../../com.groupdocs.viewer.results/attachment) implementation. +### newAttachment(String id, String fileName, Path filePath, long size) {#newAttachment-java.lang.String-java.lang.String-java.nio.file.Path-long-} +``` +public Attachment newAttachment(String id, String fileName, Path filePath, long size) +``` + + +Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| id | java.lang.String | The ID of the attachment. | +| fileName | java.lang.String | The name of the attachment. | +| filePath | java.nio.file.Path | The relative or absolute path of the attachment. | +| size | long | The size of the attachment. | + +**Returns:** +[Attachment](../../com.groupdocs.viewer.results/attachment) - a new instance of the [Attachment](../../com.groupdocs.viewer.results/attachment) implementation. +### newAttachment(String id, String fileName, String filePath, FileType fileType, long size) {#newAttachment-java.lang.String-java.lang.String-java.lang.String-com.groupdocs.viewer.FileType-long-} +``` +public Attachment newAttachment(String id, String fileName, String filePath, FileType fileType, long size) +``` + + +Creates an implementation of the [Attachment](../../com.groupdocs.viewer.results/attachment) interface. The attachment represents a file attached to a document or an email message. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| id | java.lang.String | The ID of the attachment. | +| fileName | java.lang.String | The name of the attachment. | +| filePath | java.lang.String | The relative or absolute path of the attachment. It can be a file path within a folder or the filename itself if the file is located in the root of an archive, in an email message, or in a data file. | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The type of the attachment file. | +| size | long | The size of the attachment. | + +**Returns:** +[Attachment](../../com.groupdocs.viewer.results/attachment) - a new instance of the [Attachment](../../com.groupdocs.viewer.results/attachment) implementation. +### newOutlookViewInfo(FileType fileType, List pages, List folders) {#newOutlookViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.List-java.lang.String--} +``` +public OutlookViewInfo newOutlookViewInfo(FileType fileType, List pages, List folders) +``` + + +Creates an implementation of the [OutlookViewInfo](../../com.groupdocs.viewer.results/outlookviewinfo) interface based on the specified file type, list of pages, and list of folders. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | +| pages | java.util.List | The list of pages. | +| folders | java.util.List | The list of folders. | + +**Returns:** +[OutlookViewInfo](../../com.groupdocs.viewer.results/outlookviewinfo) - a new instance of the [OutlookViewInfo](../../com.groupdocs.viewer.results/outlookviewinfo) implementation. +### newPage(int number, boolean visible) {#newPage-int-boolean-} +``` +public Page newPage(int number, boolean visible) +``` + + +Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number and visibility. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| number | int | The page number. | +| visible | boolean | The visibility flag. | + +**Returns:** +[Page](../../com.groupdocs.viewer.results/page) - a new instance of the [Page](../../com.groupdocs.viewer.results/page) implementation. +### newPage(int number, String name, boolean visible) {#newPage-int-java.lang.String-boolean-} +``` +public Page newPage(int number, String name, boolean visible) +``` + + +Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, name, and visibility. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| number | int | The page number. | +| name | java.lang.String | The page name. | +| visible | boolean | The visibility flag. | + +**Returns:** +[Page](../../com.groupdocs.viewer.results/page) - a new instance of the [Page](../../com.groupdocs.viewer.results/page) implementation. +### newPage(int number, String name, boolean visible, int width, int height) {#newPage-int-java.lang.String-boolean-int-int-} +``` +public Page newPage(int number, String name, boolean visible, int width, int height) +``` + + +Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, name, visibility, width, and height. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| number | int | The page number. | +| name | java.lang.String | The page name. | +| visible | boolean | The visibility flag. | +| width | int | The width of the page. | +| height | int | The height of the page. | + +**Returns:** +[Page](../../com.groupdocs.viewer.results/page) - a new instance of the [Page](../../com.groupdocs.viewer.results/page) implementation. +### newPage(int number, boolean visible, int width, int height) {#newPage-int-boolean-int-int-} +``` +public Page newPage(int number, boolean visible, int width, int height) +``` + + +Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, visibility, width, and height. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| number | int | The page number. | +| visible | boolean | The visibility flag. | +| width | int | The width of the page. | +| height | int | The height of the page. | + +**Returns:** +[Page](../../com.groupdocs.viewer.results/page) - a new instance of the [Page](../../com.groupdocs.viewer.results/page) implementation. +### newPage(int number, String name, boolean visible, int width, int height, List lines) {#newPage-int-java.lang.String-boolean-int-int-java.util.List-com.groupdocs.viewer.results.Line--} +``` +public Page newPage(int number, String name, boolean visible, int width, int height, List lines) +``` + + +Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, name, visibility, width, height, and lines. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| number | int | The page number. | +| name | java.lang.String | The page name. | +| visible | boolean | The visibility flag. | +| width | int | The width of the page. | +| height | int | The height of the page. | +| lines | java.util.List | The lines contained in the page. | + +**Returns:** +[Page](../../com.groupdocs.viewer.results/page) - a new instance of the [Page](../../com.groupdocs.viewer.results/page) implementation. +### newPage(int number, boolean visible, int width, int height, List lines) {#newPage-int-boolean-int-int-java.util.List-com.groupdocs.viewer.results.Line--} +``` +public Page newPage(int number, boolean visible, int width, int height, List lines) +``` + + +Creates an implementation of the [Page](../../com.groupdocs.viewer.results/page) interface representing a page with the specified number, visibility, width, height, and lines. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| number | int | The page number. | +| visible | boolean | The visibility flag. | +| width | int | The width of the page. | +| height | int | The height of the page. | +| lines | java.util.List | The lines contained in the page. | + +**Returns:** +[Page](../../com.groupdocs.viewer.results/page) - a new instance of the [Page](../../com.groupdocs.viewer.results/page) implementation. +### newPdfViewInfo(FileType fileType, List pages, boolean printingAllowed) {#newPdfViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--boolean-} +``` +public PdfViewInfo newPdfViewInfo(FileType fileType, List pages, boolean printingAllowed) +``` + + +Creates an implementation of the [PdfViewInfo](../../com.groupdocs.viewer.results/pdfviewinfo) interface with the specified file type, pages, and printing allowed flag. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | +| pages | java.util.List | The list of pages. | +| printingAllowed | boolean | The flag indicating whether printing is allowed. | + +**Returns:** +[PdfViewInfo](../../com.groupdocs.viewer.results/pdfviewinfo) - a new instance of the [PdfViewInfo](../../com.groupdocs.viewer.results/pdfviewinfo) implementation. +### newCadViewInfo(FileType fileType, List pages, List layers, List layouts) {#newCadViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.List-com.groupdocs.viewer.results.Layer--java.util.List-com.groupdocs.viewer.results.Layout--} +``` +public CadViewInfo newCadViewInfo(FileType fileType, List pages, List layers, List layouts) +``` + + +Creates an implementation of the [CadViewInfo](../../com.groupdocs.viewer.results/cadviewinfo) interface with the specified file type, pages, layers, and layouts. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | +| pages | java.util.List | The list of pages. | +| layers | java.util.List | The list of layers. | +| layouts | java.util.List | The list of layouts. | + +**Returns:** +[CadViewInfo](../../com.groupdocs.viewer.results/cadviewinfo) - a new instance of the [CadViewInfo](../../com.groupdocs.viewer.results/cadviewinfo) implementation. +### newProjectManagementViewInfo(FileType fileType, List pages, Date startDate, Date endDate) {#newProjectManagementViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--java.util.Date-java.util.Date-} +``` +public ProjectManagementViewInfo newProjectManagementViewInfo(FileType fileType, List pages, Date startDate, Date endDate) +``` + + +Creates an implementation of the [ProjectManagementViewInfo](../../com.groupdocs.viewer.results/projectmanagementviewinfo) interface with the specified file type, pages, start date, and end date. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | +| pages | java.util.List | The list of pages. | +| startDate | java.util.Date | The start date. | +| endDate | java.util.Date | The end date. | + +**Returns:** +[ProjectManagementViewInfo](../../com.groupdocs.viewer.results/projectmanagementviewinfo) - a new instance of the [ProjectManagementViewInfo](../../com.groupdocs.viewer.results/projectmanagementviewinfo) implementation. +### newTextElement(T value, double x, double y, double width, double height) {#-T-newTextElement-T-double-double-double-double-} +``` +public TextElement newTextElement(T value, double x, double y, double width, double height) +``` + + +Creates an implementation of the [TextElement](../../com.groupdocs.viewer.results/textelement) interface with the specified value, coordinates, and dimensions. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | The value. | +| x | double | The X coordinate. | +| y | double | The Y coordinate. | +| width | double | The width. | +| height | double | The height. | + +**Returns:** +[TextElement](../../com.groupdocs.viewer.results/textelement) - a new instance of the [TextElement](../../com.groupdocs.viewer.results/textelement) implementation. +### newMboxViewInfo(FileType fileType, List pages, int notesCount) {#newMboxViewInfo-com.groupdocs.viewer.FileType-java.util.List-com.groupdocs.viewer.results.Page--int-} +``` +public MboxViewInfo newMboxViewInfo(FileType fileType, List pages, int notesCount) +``` + + +Creates an implementation of the MboxViewInfo interface with the specified file type, pages, and notes count. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The type of the file. | +| pages | java.util.List | The list of pages to view. | +| notesCount | int | The notes count contained by the Lotus database storage file. | + +**Returns:** +com.groupdocs.viewer.results.MboxViewInfo - a new instance of the MboxViewInfo implementation. +### newWord(String word, double x, double y, double width, double height, List characters) {#newWord-java.lang.String-double-double-double-double-java.util.List-com.groupdocs.viewer.results.Character--} +``` +public Word newWord(String word, double x, double y, double width, double height, List characters) +``` + + +Creates an implementation of the [Word](../../com.groupdocs.viewer.results/word) interface with the specified word, coordinates, dimensions, and characters. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| word | java.lang.String | The word. | +| x | double | The X coordinate of the highest left point on the page layout where the rectangle that contains the word begins. | +| y | double | The Y coordinate of the highest left point on the page layout where the rectangle that contains the word begins. | +| width | double | The width of the rectangle which contains the word (in pixels). | +| height | double | The height of the rectangle which contains the word (in pixels). | +| characters | java.util.List | The characters contained by the word. | + +**Returns:** +[Word](../../com.groupdocs.viewer.results/word) - a new instance of the [Word](../../com.groupdocs.viewer.results/word) implementation. diff --git a/english/nodejs-java/com.groupdocs.viewer.caching/_index.md b/english/nodejs-java/com.groupdocs.viewer.caching/_index.md new file mode 100644 index 00000000..b0e28cb4 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.caching/_index.md @@ -0,0 +1,36 @@ +--- +title: com.groupdocs.viewer.caching +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides classes for customizing caching behavior. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer.caching/ +--- + +The package provides classes for customizing caching behavior. + +The main classes and interfaces in this package are: + + * [CacheKeys](../../com.groupdocs.viewer.caching/cachekeys) - Provides methods to retrieve unique identifiers for the cache entry. + * [FileCache](../../com.groupdocs.viewer.caching/filecache) - Represents a local on-disk cache. + +The [Cache](../../com.groupdocs.viewer.caching/cache) interface defines methods required for storing rendered documents and document resources in the cache. + +For more details on customizing caching behavior in GroupDocs.Viewer, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [CacheKeys](../com.groupdocs.viewer.caching/cachekeys) | Provides methods to retrieve the unique identifier for a cache entry. | +| [FileCache](../com.groupdocs.viewer.caching/filecache) | Represents a local on-disk cache. | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [Cache](../com.groupdocs.viewer.caching/cache) | Defines methods required for storing rendered documents and document resources cache. | diff --git a/english/nodejs-java/com.groupdocs.viewer.caching/cache/_index.md b/english/nodejs-java/com.groupdocs.viewer.caching/cache/_index.md new file mode 100644 index 00000000..0c3bd188 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.caching/cache/_index.md @@ -0,0 +1,92 @@ +--- +title: Cache +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Defines methods required for storing rendered documents and document resources cache. +type: docs +weight: 12 +url: /nodejs-java/com.groupdocs.viewer.caching/cache/ +---``` +public interface Cache +``` + +Defines methods required for storing rendered documents and document resources cache. + +The Cache interface defines the methods required for storing rendered documents and document resources cache in the GroupDocs.Viewer component. It provides a contract for implementing different cache mechanisms to enhance the performance of document rendering by caching frequently accessed data. + +Example usage: + +``` + + // Implement a custom cache by implementing the Cache interface + public class MyCustomCache implements Cache { + // Implement the methods of the Cache interface based on your caching mechanism + // ... + } + + // Create an instance of your custom cache + Cache myCache = new MyCustomCache(); + + final ViewerSettings viewerSettings = new ViewerSettings(); + // Set the custom cache to viewerSettings + viewerSettings.setCache(myCache); + + // Use the viewerSettings object for creating Viewer object to render document with custom cache + try (Viewer viewer = new Viewer(documentPath, viewerSettings)) { + // Use the viewer object for document rendering + } + +``` + +***Note:** The Cache interface allows you to implement custom cache mechanisms tailored to your specific requirements. GroupDocs.Viewer also provides built-in cache implementation such as [FileCache](../../com.groupdocs.viewer.caching/filecache).* +## Methods + +| Method | Description | +| --- | --- | +| [set(String key, Object value)](#set-java.lang.String-java.lang.Object-) | Inserts a cache entry into the cache. | +| [get(String key, Class clazz)](#-T-get-java.lang.String-java.lang.Class-T--) | Retrieves the entry associated with the specified key if it is present, and returns null otherwise. | +| [getKeys(String filter)](#getKeys-java.lang.String-) | Returns all keys that match the specified filter. | +### set(String key, Object value) {#set-java.lang.String-java.lang.Object-} +``` +public abstract void set(String key, Object value) +``` + + +Inserts a cache entry into the cache. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| key | java.lang.String | A unique identifier for the cache entry. | +| value | java.lang.Object | The object to insert. | + +### get(String key, Class clazz) {#-T-get-java.lang.String-java.lang.Class-T--} +``` +public abstract T get(String key, Class clazz) +``` + + +Retrieves the entry associated with the specified key if it is present, and returns null otherwise. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| key | java.lang.String | A key identifying the requested entry. | +| clazz | java.lang.Class | The class type of the expected entry. | + +**Returns:** +T - the entry associated with the key if found, or null otherwise. +### getKeys(String filter) {#getKeys-java.lang.String-} +``` +public abstract List getKeys(String filter) +``` + + +Returns all keys that match the specified filter. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filter | java.lang.String | The filter to use. | + +**Returns:** +java.util.List - a list of keys that match the filter. diff --git a/english/nodejs-java/com.groupdocs.viewer.caching/cachekeys/_index.md b/english/nodejs-java/com.groupdocs.viewer.caching/cachekeys/_index.md new file mode 100644 index 00000000..04320d04 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.caching/cachekeys/_index.md @@ -0,0 +1,163 @@ +--- +title: CacheKeys +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides methods to retrieve the unique identifier for a cache entry. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer.caching/cachekeys/ +--- +**Inheritance:** +java.lang.Object +``` +public class CacheKeys +``` + +Provides methods to retrieve the unique identifier for a cache entry. + +The class allows you to generate cache keys based on different parameters, such as the document path, rendering options, and resource name. These cache keys can be used to store and retrieve cached data for efficient document rendering. + +Example usage: + +``` + + // Generate a cache key for a file + String fileKey = CacheKeys.getFileKey("filename.pdf"); + + // Generate a cache key for a page + String pageKey = CacheKeys.getPageKey(pageNumber, FileType.HTML.getExtension()); + + // Generate a cache key for a resource + Resource resource = new Resource("styles.css", false); + String pageKey = CacheKeys.getResourceKey(pageNumber, resource); + +``` +## Fields + +| Field | Description | +| --- | --- | +| [PAGE_NUMBER](#PAGE-NUMBER) | | +## Methods + +| Method | Description | +| --- | --- | +| [getAttachmentsKey()](#getAttachmentsKey--) | Returns the unique identifier for the cache entry that represents a collection of [Attachment](../../com.groupdocs.viewer.results/attachment) objects. | +| [getAttachmentKey(String attachmentId)](#getAttachmentKey-java.lang.String-) | Retrieves the unique identifier for the cache entry representing an attachment file. | +| [getViewInfoKey()](#getViewInfoKey--) | Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. | +| [getFileInfoKey()](#getFileInfoKey--) | Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. | +| [getFileKey(String extension)](#getFileKey-java.lang.String-) | Retrieves the unique identifier for the cache entry that represents a file. | +| [getPageKey(int pageNumber, String extension)](#getPageKey-int-java.lang.String-) | Retrieves the unique identifier for the cache entry that represents a page file. | +| [getResourceKey(int pageNumber, Resource resource)](#getResourceKey-int-com.groupdocs.viewer.results.Resource-) | Returns a unique identifier for the cache entry that represents a [Resource](../../com.groupdocs.viewer.results/resource) object. | +| [getResourceFilter(int pageNumber)](#getResourceFilter-int-) | Returns a filter string to search for cache entries that represent [Resource](../../com.groupdocs.viewer.results/resource) objects. | +### PAGE_NUMBER {#PAGE-NUMBER} +``` +public static final String PAGE_NUMBER +``` + + +### getAttachmentsKey() {#getAttachmentsKey--} +``` +public static String getAttachmentsKey() +``` + + +Returns the unique identifier for the cache entry that represents a collection of [Attachment](../../com.groupdocs.viewer.results/attachment) objects. + +**Returns:** +java.lang.String - the unique identifier for the attachments cache entry. +### getAttachmentKey(String attachmentId) {#getAttachmentKey-java.lang.String-} +``` +public static String getAttachmentKey(String attachmentId) +``` + + +Retrieves the unique identifier for the cache entry representing an attachment file. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| attachmentId | java.lang.String | The unique identifier of the attachment (in the context of a single file). | + +**Returns:** +java.lang.String - the unique identifier for the attachment file cache entry. +### getViewInfoKey() {#getViewInfoKey--} +``` +public static String getViewInfoKey() +``` + + +Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. + +**Returns:** +java.lang.String - the unique identifier for the cache entry. +### getFileInfoKey() {#getFileInfoKey--} +``` +public static String getFileInfoKey() +``` + + +Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. + +**Returns:** +java.lang.String - the unique identifier for the cache entry representing a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. +### getFileKey(String extension) {#getFileKey-java.lang.String-} +``` +public static String getFileKey(String extension) +``` + + +Retrieves the unique identifier for the cache entry that represents a file. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| extension | java.lang.String | The filename suffix (including the period ".") e.g. ".doc". | + +**Returns:** +java.lang.String - the unique identifier for the cache entry representing a file. +### getPageKey(int pageNumber, String extension) {#getPageKey-int-java.lang.String-} +``` +public static String getPageKey(int pageNumber, String extension) +``` + + +Retrieves the unique identifier for the cache entry that represents a page file. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageNumber | int | The number of the page. | +| extension | java.lang.String | The filename suffix (including the period ".") e.g. ".doc". | + +**Returns:** +java.lang.String - the unique identifier for the cache entry representing a page file. +### getResourceKey(int pageNumber, Resource resource) {#getResourceKey-int-com.groupdocs.viewer.results.Resource-} +``` +public static String getResourceKey(int pageNumber, Resource resource) +``` + + +Returns a unique identifier for the cache entry that represents a [Resource](../../com.groupdocs.viewer.results/resource) object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageNumber | int | The number of the page. | +| resource | [Resource](../../com.groupdocs.viewer.results/resource) | The HTML resource. | + +**Returns:** +java.lang.String - the unique identifier for the cache entry. +### getResourceFilter(int pageNumber) {#getResourceFilter-int-} +``` +public static String getResourceFilter(int pageNumber) +``` + + +Returns a filter string to search for cache entries that represent [Resource](../../com.groupdocs.viewer.results/resource) objects. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageNumber | int | The number of the page. | + +**Returns:** +java.lang.String - the filter string to search for cache entries. diff --git a/english/nodejs-java/com.groupdocs.viewer.caching/filecache/_index.md b/english/nodejs-java/com.groupdocs.viewer.caching/filecache/_index.md new file mode 100644 index 00000000..3e33ec12 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.caching/filecache/_index.md @@ -0,0 +1,186 @@ +--- +title: FileCache +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a local on-disk cache. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer.caching/filecache/ +--- +**Inheritance:** +java.lang.Object + +**All Implemented Interfaces:** +[com.groupdocs.viewer.caching.Cache](../../com.groupdocs.viewer.caching/cache) +``` +public class FileCache implements Cache +``` + +Represents a local on-disk cache. + +The FileCache class represents a local on-disk cache in the GroupDocs.Viewer component. It provides functionality to store and retrieve cached data on the disk for efficient document rendering. + +Example usage: + +``` + + FileCache fileCache = new FileCache(cachePath, cacheSubFolder); + + final ViewerSettings viewerSettings = new ViewerSettings(); + viewerSettings.setCache(fileCache); + + try (Viewer viewer = new Viewer(documentPath, viewerSettings)) { + // Use the viewer object for document rendering + } + +``` + +To use the FileCache, you need to create an instance of this class and pass it to the ViewerSettings object. The Viewer object will then use the FileCache for caching purposes while rendering documents. + +***Note:** The FileCache is just one of the cache implementations provided by GroupDocs.Viewer. You can also implement your own custom cache by implementing the Cache interface.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [FileCache(String cachePath)](#FileCache-java.lang.String-) | Creates a new instance of the FileCache class. | +| [FileCache(Path cachePath)](#FileCache-java.nio.file.Path-) | Creates a new instance of the FileCache class. | +| [FileCache(String cachePath, String cacheSubFolder)](#FileCache-java.lang.String-java.lang.String-) | Creates a new instance of the FileCache class. | +| [FileCache(Path cachePath, String cacheSubFolder)](#FileCache-java.nio.file.Path-java.lang.String-) | Creates a new instance of the FileCache class. | +## Fields + +| Field | Description | +| --- | --- | +| [CACHE_PATH](#CACHE-PATH) | | +## Methods + +| Method | Description | +| --- | --- | +| [getCachePath()](#getCachePath--) | Gets the relative or absolute path to the cache folder. | +| [getCacheSubFolder()](#getCacheSubFolder--) | The sub-folder to append to the cache path. | +| [set(String key, Object value)](#set-java.lang.String-java.lang.Object-) | Serializes data to the local disk. | +| [get(String key, Class clazz)](#-T-get-java.lang.String-java.lang.Class-T--) | Deserializes data associated with this key if present. | +| [getKeys(String filter)](#getKeys-java.lang.String-) | Returns all file names that contain the filter in the filename. | +### FileCache(String cachePath) {#FileCache-java.lang.String-} +``` +public FileCache(String cachePath) +``` + + +Creates a new instance of the FileCache class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| cachePath | java.lang.String | The relative or absolute path where the document cache will be stored. | + +### FileCache(Path cachePath) {#FileCache-java.nio.file.Path-} +``` +public FileCache(Path cachePath) +``` + + +Creates a new instance of the FileCache class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| cachePath | java.nio.file.Path | The relative or absolute path where the document cache will be stored. | + +### FileCache(String cachePath, String cacheSubFolder) {#FileCache-java.lang.String-java.lang.String-} +``` +public FileCache(String cachePath, String cacheSubFolder) +``` + + +Creates a new instance of the FileCache class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| cachePath | java.lang.String | The relative or absolute path where the document cache will be stored. | +| cacheSubFolder | java.lang.String | The sub-folder to append to cachePath . | + +### FileCache(Path cachePath, String cacheSubFolder) {#FileCache-java.nio.file.Path-java.lang.String-} +``` +public FileCache(Path cachePath, String cacheSubFolder) +``` + + +Creates a new instance of the FileCache class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| cachePath | java.nio.file.Path | The relative or absolute path where the document cache will be stored. | +| cacheSubFolder | java.lang.String | The sub-folder to append to cachePath . | + +### CACHE_PATH {#CACHE-PATH} +``` +public static final String CACHE_PATH +``` + + +### getCachePath() {#getCachePath--} +``` +public final String getCachePath() +``` + + +Gets the relative or absolute path to the cache folder. + +**Returns:** +java.lang.String - Path to the cache folder. +### getCacheSubFolder() {#getCacheSubFolder--} +``` +public final String getCacheSubFolder() +``` + + +The sub-folder to append to the cache path. + +**Returns:** +java.lang.String - the sub-folder to append. +### set(String key, Object value) {#set-java.lang.String-java.lang.Object-} +``` +public final void set(String key, Object value) +``` + + +Serializes data to the local disk. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| key | java.lang.String | The unique identifier for the cache entry. | +| value | java.lang.Object | The object to serialize. | + +### get(String key, Class clazz) {#-T-get-java.lang.String-java.lang.Class-T--} +``` +public final T get(String key, Class clazz) +``` + + +Deserializes data associated with this key if present. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| key | java.lang.String | A key identifying the requested entry. | +| clazz | java.lang.Class | The class of the expected value. | + +**Returns:** +T - the located value or null. +### getKeys(String filter) {#getKeys-java.lang.String-} +``` +public final List getKeys(String filter) +``` + + +Returns all file names that contain the filter in the filename. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filter | java.lang.String | The filter to use. | + +**Returns:** +java.util.List - File names that contain the filter in the filename. diff --git a/english/nodejs-java/com.groupdocs.viewer.fonts/_index.md b/english/nodejs-java/com.groupdocs.viewer.fonts/_index.md new file mode 100644 index 00000000..87afa8a6 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.fonts/_index.md @@ -0,0 +1,41 @@ +--- +title: com.groupdocs.viewer.fonts +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides classes and enumerations to manage fonts used during the rendering process. +type: docs +weight: 13 +url: /nodejs-java/com.groupdocs.viewer.fonts/ +--- + +The package provides classes and enumerations to manage fonts used during the rendering process. + +The main classes and interfaces in this package are: + + * [FolderFontSource](../../com.groupdocs.viewer.fonts/folderfontsource) - Represents a folder that contains TrueType fonts. + * [FontSettings](../../com.groupdocs.viewer.fonts/fontsettings) - Provides methods for working with sources to look for TrueType fonts. + * [FontSource](../../com.groupdocs.viewer.fonts/fontsource) - Marker interface for the font sources. + +For more details on working with fonts in GroupDocs.Viewer, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [FolderFontSource](../com.groupdocs.viewer.fonts/folderfontsource) | Represents a folder that contains TrueType fonts. | +| [FontSettings](../com.groupdocs.viewer.fonts/fontsettings) | Provides methods for working with sources to look for TrueType fonts. | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [FontSource](../com.groupdocs.viewer.fonts/fontsource) | Marker interface for the font sources. | + +## Enumerations + +| Enum | Description | +| --- | --- | +| [SearchOption](../com.groupdocs.viewer.fonts/searchoption) | Specifies whether to search the current folder, or the current folder and all subfolders. | diff --git a/english/nodejs-java/com.groupdocs.viewer.fonts/folderfontsource/_index.md b/english/nodejs-java/com.groupdocs.viewer.fonts/folderfontsource/_index.md new file mode 100644 index 00000000..1bcd0c0a --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.fonts/folderfontsource/_index.md @@ -0,0 +1,172 @@ +--- +title: FolderFontSource +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a folder that contains TrueType fonts. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer.fonts/folderfontsource/ +--- +**Inheritance:** +java.lang.Object + +**All Implemented Interfaces:** +[com.groupdocs.viewer.fonts.FontSource](../../com.groupdocs.viewer.fonts/fontsource), com.aspose.ms.System.IEquatable +``` +public final class FolderFontSource implements FontSource, System.IEquatable +``` + +Represents a folder that contains TrueType fonts. + +The FolderFontSource class is used to specify a folder location that contains TrueType fonts. It allows the GroupDocs.Viewer API to access the fonts stored in the specified folder for document rendering purposes. + +Example usage: + +``` + + FontSettings.setFontSources(new FolderFontSource("/path/to/fonts/folder", SearchOption.ALL_FOLDERS)); + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [FolderFontSource(String folderPath, SearchOption searchOption)](#FolderFontSource-java.lang.String-com.groupdocs.viewer.fonts.SearchOption-) | Initializes a new instance of the FolderFontSource class. | +## Methods + +| Method | Description | +| --- | --- | +| [isEqualTo(FolderFontSource left, FolderFontSource right)](#isEqualTo-com.groupdocs.viewer.fonts.FolderFontSource-com.groupdocs.viewer.fonts.FolderFontSource-) | Determines whether two FolderFontSource objects are the same. | +| [isNotEqualTo(FolderFontSource left, FolderFontSource right)](#isNotEqualTo-com.groupdocs.viewer.fonts.FolderFontSource-com.groupdocs.viewer.fonts.FolderFontSource-) | Determines whether two FolderFontSource objects are not the same. | +| [getFolderPath()](#getFolderPath--) | Gets the path to the folder that contains TrueType fonts. | +| [getSearchOption()](#getSearchOption--) | Gets the search option that specifies whether to search the current folder, or the current folder and all subfolders. | +| [isRecursive()](#isRecursive--) | Checks if the fonts would be searched recursively. | +| [equals(FolderFontSource other)](#equals-com.groupdocs.viewer.fonts.FolderFontSource-) | Determines whether the current FolderFontSource is the same as the specified FolderFontSource object. | +| [equals(Object o)](#equals-java.lang.Object-) | Determines whether the current FolderFontSource is the same as the specified object. | +| [hashCode()](#hashCode--) | Returns the hash code for the current FolderFontSource object. | +| [toString()](#toString--) | Returns a string that represents the current object. | +### FolderFontSource(String folderPath, SearchOption searchOption) {#FolderFontSource-java.lang.String-com.groupdocs.viewer.fonts.SearchOption-} +``` +public FolderFontSource(String folderPath, SearchOption searchOption) +``` + + +Initializes a new instance of the FolderFontSource class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| folderPath | java.lang.String | Path to the folder that contains TrueType fonts. | +| searchOption | [SearchOption](../../com.groupdocs.viewer.fonts/searchoption) | Specifies whether to search the current folder, or the current folder and all sub-folders. | + +### isEqualTo(FolderFontSource left, FolderFontSource right) {#isEqualTo-com.groupdocs.viewer.fonts.FolderFontSource-com.groupdocs.viewer.fonts.FolderFontSource-} +``` +public static boolean isEqualTo(FolderFontSource left, FolderFontSource right) +``` + + +Determines whether two FolderFontSource objects are the same. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| left | [FolderFontSource](../../com.groupdocs.viewer.fonts/folderfontsource) | The left FolderFontSource object. | +| right | [FolderFontSource](../../com.groupdocs.viewer.fonts/folderfontsource) | The right FolderFontSource object. | + +**Returns:** +boolean - true if both FolderFontSource objects are the same; otherwise, false . +### isNotEqualTo(FolderFontSource left, FolderFontSource right) {#isNotEqualTo-com.groupdocs.viewer.fonts.FolderFontSource-com.groupdocs.viewer.fonts.FolderFontSource-} +``` +public static boolean isNotEqualTo(FolderFontSource left, FolderFontSource right) +``` + + +Determines whether two FolderFontSource objects are not the same. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| left | [FolderFontSource](../../com.groupdocs.viewer.fonts/folderfontsource) | The left FolderFontSource object. | +| right | [FolderFontSource](../../com.groupdocs.viewer.fonts/folderfontsource) | The right FolderFontSource object. | + +**Returns:** +boolean - true if both FolderFontSource objects are not the same; otherwise, false . +### getFolderPath() {#getFolderPath--} +``` +public final String getFolderPath() +``` + + +Gets the path to the folder that contains TrueType fonts. + +**Returns:** +java.lang.String - the path to the folder that contains TrueType fonts. +### getSearchOption() {#getSearchOption--} +``` +public final SearchOption getSearchOption() +``` + + +Gets the search option that specifies whether to search the current folder, or the current folder and all subfolders. + +**Returns:** +[SearchOption](../../com.groupdocs.viewer.fonts/searchoption) - the search option. +### isRecursive() {#isRecursive--} +``` +public boolean isRecursive() +``` + + +Checks if the fonts would be searched recursively. + +**Returns:** +boolean - true if the fonts would be searched recursively, false otherwise. +### equals(FolderFontSource other) {#equals-com.groupdocs.viewer.fonts.FolderFontSource-} +``` +public final boolean equals(FolderFontSource other) +``` + + +Determines whether the current FolderFontSource is the same as the specified FolderFontSource object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| other | [FolderFontSource](../../com.groupdocs.viewer.fonts/folderfontsource) | The object to compare with the current FolderFontSource object. | + +**Returns:** +boolean - true if both FolderFontSource objects are the same; otherwise, false +### equals(Object o) {#equals-java.lang.Object-} +``` +public boolean equals(Object o) +``` + + +Determines whether the current FolderFontSource is the same as the specified object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| o | java.lang.Object | The object to compare with the current FolderFontSource object. | + +**Returns:** +boolean - true if the obj parameter is of type FolderFontSource and is the same as the current FolderFontSource object; otherwise, false +### hashCode() {#hashCode--} +``` +public int hashCode() +``` + + +Returns the hash code for the current FolderFontSource object. + +**Returns:** +int - a hash code for the current FolderFontSource object. +### toString() {#toString--} +``` +public String toString() +``` + + +Returns a string that represents the current object. + +**Returns:** +java.lang.String - a string that represents the current object. diff --git a/english/nodejs-java/com.groupdocs.viewer.fonts/fontsettings/_index.md b/english/nodejs-java/com.groupdocs.viewer.fonts/fontsettings/_index.md new file mode 100644 index 00000000..80988b42 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.fonts/fontsettings/_index.md @@ -0,0 +1,63 @@ +--- +title: FontSettings +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides methods for working with sources to look for TrueType fonts. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer.fonts/fontsettings/ +--- +**Inheritance:** +java.lang.Object +``` +public class FontSettings +``` + +Provides methods for working with sources to look for TrueType fonts. + +The FontSettings class is used to specify and manage sources for locating TrueType fonts. It provides methods to add and reset font sources for the GroupDocs.Viewer API. + +Example usage: + +``` + + FontSettings.setFontSources(new FolderFontSource("/path/to/fonts/folder", SearchOption.ALL_FOLDERS)); + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [FontSettings()](#FontSettings--) | | +## Methods + +| Method | Description | +| --- | --- | +| [setFontSources(FontSource[] fontSources)](#setFontSources-com.groupdocs.viewer.fonts.FontSource...-) | Sets the sources to look for TrueType fonts when rendering documents. | +| [resetFontSources()](#resetFontSources--) | Resets the font sources that have been set before. | +### FontSettings() {#FontSettings--} +``` +public FontSettings() +``` + + +### setFontSources(FontSource[] fontSources) {#setFontSources-com.groupdocs.viewer.fonts.FontSource...-} +``` +public static void setFontSources(FontSource[] fontSources) +``` + + +Sets the sources to look for TrueType fonts when rendering documents. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fontSources | [FontSource\[\]](../../com.groupdocs.viewer.fonts/fontsource) | The font sources to set. | + +### resetFontSources() {#resetFontSources--} +``` +public static void resetFontSources() +``` + + +Resets the font sources that have been set before. + diff --git a/english/nodejs-java/com.groupdocs.viewer.fonts/fontsource/_index.md b/english/nodejs-java/com.groupdocs.viewer.fonts/fontsource/_index.md new file mode 100644 index 00000000..f22d3ea2 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.fonts/fontsource/_index.md @@ -0,0 +1,16 @@ +--- +title: FontSource +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Marker interface for the font sources. +type: docs +weight: 12 +url: /nodejs-java/com.groupdocs.viewer.fonts/fontsource/ +---``` +public interface FontSource +``` + +Marker interface for the font sources. + +The FontSource interface serves as a marker interface for all types of font sources used in the GroupDocs.Viewer API. + +***Note:** This is a marker interface and does not define any additional methods or functionality. Its purpose is to categorize and identify font source implementations.* diff --git a/english/nodejs-java/com.groupdocs.viewer.fonts/searchoption/_index.md b/english/nodejs-java/com.groupdocs.viewer.fonts/searchoption/_index.md new file mode 100644 index 00000000..2e36b53c --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.fonts/searchoption/_index.md @@ -0,0 +1,80 @@ +--- +title: SearchOption +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Specifies whether to search the current folder or the current folder and all subfolders. +type: docs +weight: 13 +url: /nodejs-java/com.groupdocs.viewer.fonts/searchoption/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum SearchOption extends Enum +``` + +Specifies whether to search the current folder, or the current folder and all subfolders. + +The SearchOption enum is used to specify the scope of font search operation in the GroupDocs.Viewer API. + +Example usage: + +``` + + FontSettings.setFontSources(new FolderFontSource("/path/to/fonts/folder", SearchOption.ALL_FOLDERS)); + +``` + +***Note:** This enum is typically used to specify strategy of searching fonts in provided directory.* +## Fields + +| Field | Description | +| --- | --- | +| [TOP_FOLDER_ONLY](#TOP-FOLDER-ONLY) | Includes only the current folder in a search. | +| [ALL_FOLDERS](#ALL-FOLDERS) | Includes the current folder and all the subfolders in a search. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +### TOP_FOLDER_ONLY {#TOP-FOLDER-ONLY} +``` +public static final SearchOption TOP_FOLDER_ONLY +``` + + +Includes only the current folder in a search. + +### ALL_FOLDERS {#ALL-FOLDERS} +``` +public static final SearchOption ALL_FOLDERS +``` + + +Includes the current folder and all the subfolders in a search. + +### values() {#values--} +``` +public static SearchOption[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.fonts.SearchOption[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static SearchOption valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[SearchOption](../../com.groupdocs.viewer.fonts/searchoption) diff --git a/english/nodejs-java/com.groupdocs.viewer.logging/_index.md b/english/nodejs-java/com.groupdocs.viewer.logging/_index.md new file mode 100644 index 00000000..7758ed39 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.logging/_index.md @@ -0,0 +1,30 @@ +--- +title: com.groupdocs.viewer.logging +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides classes for configuring the logging system in GroupDocs.Viewer. +type: docs +weight: 14 +url: /nodejs-java/com.groupdocs.viewer.logging/ +--- + +The package provides classes for configuring the logging system in GroupDocs.Viewer. + +By using these classes, you can control how log messages are handled, such as writing them to a file or directing them to a specific logger implementation. + +The main classes in this package are: + + * [FileLogger](../../com.groupdocs.viewer.logging/filelogger) - Writes log messages to a file. + * [ViewerLogger](../../com.groupdocs.viewer.logging/viewerlogger) - Implements logging messages to an integrated or user-defined logger. + +For more details on configuring the logging system in GroupDocs.Viewer and customizing the log message handling, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [FileLogger](../com.groupdocs.viewer.logging/filelogger) | Writes log messages to a file. | +| [ViewerLogger](../com.groupdocs.viewer.logging/viewerlogger) | Global viewer logger. | diff --git a/english/nodejs-java/com.groupdocs.viewer.logging/filelogger/_index.md b/english/nodejs-java/com.groupdocs.viewer.logging/filelogger/_index.md new file mode 100644 index 00000000..4634ffc4 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.logging/filelogger/_index.md @@ -0,0 +1,266 @@ +--- +title: FileLogger +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Writes log messages to a file. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer.logging/filelogger/ +--- +**Inheritance:** +java.lang.Object + +**All Implemented Interfaces:** +com.groupdocs.foundation.logging.ILogger +``` +public class FileLogger implements ILogger +``` + +Writes log messages to a file. + +The FileLogger class provides functionality to write log messages to a file. It implements the ILogger interface and can be used to log various events and messages in an application. Log messages are written to the specified file. + +Example usage: + +``` + + // Create a new instance of FileLogger with the specified log file path + FileLogger fileLogger = new FileLogger("/path/to/logfile.txt"); + + // Log an informational message + fileLogger.debug("Debug message"); + + // Log an error message + fileLogger.error("Error message"); + + // Check is logging warning messages enabled + boolean warningEnabled = fileLogger.isWarningEnabled(); + +``` + +***Note:** The FileLogger class provides basic logging functionality. You can extend this class to add custom log levels or additional logging features as per your requirements.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [FileLogger(String fileName)](#FileLogger-java.lang.String-) | Creates a logger that logs messages to a file specified by the provided file name. | +| [FileLogger(String fileName, boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled)](#FileLogger-java.lang.String-boolean-boolean-boolean-boolean-) | Creates a logger that logs messages to a file with specified logging levels. | +## Fields + +| Field | Description | +| --- | --- | +| [MESSAGE](#MESSAGE) | | +| [EXCEPTION](#EXCEPTION) | | +## Methods + +| Method | Description | +| --- | --- | +| [trace(String message, Object[] arguments)](#trace-java.lang.String-java.lang.Object...-) | Writes a trace message to the console. | +| [trace(Throwable throwable, String message, Object[] arguments)](#trace-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes a trace log message to the console. | +| [isTraceEnabled()](#isTraceEnabled--) | Checks if the trace level is enabled for logging. | +| [debug(String message, Object[] arguments)](#debug-java.lang.String-java.lang.Object...-) | Writes a debug log message to the console. | +| [debug(Throwable throwable, String message, Object[] arguments)](#debug-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes a debug log message to the console. | +| [isDebugEnabled()](#isDebugEnabled--) | Checks if the debug level is enabled for logging. | +| [warning(String message, Object[] arguments)](#warning-java.lang.String-java.lang.Object...-) | Writes a warning log message to the console. | +| [warning(Throwable throwable, String message, Object[] arguments)](#warning-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes a warning log message to the console. | +| [isWarningEnabled()](#isWarningEnabled--) | Checks if the warning level is enabled for logging. | +| [error(String message, Object[] arguments)](#error-java.lang.String-java.lang.Object...-) | Writes an error log message to the console. | +| [error(Throwable throwable, String message, Object[] arguments)](#error-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes an error log message to the console. | +| [isErrorEnabled()](#isErrorEnabled--) | Checks if error-level logging is enabled. | +### FileLogger(String fileName) {#FileLogger-java.lang.String-} +``` +public FileLogger(String fileName) +``` + + +Creates a logger that logs messages to a file specified by the provided file name. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileName | java.lang.String | The full file name with path. | + +### FileLogger(String fileName, boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled) {#FileLogger-java.lang.String-boolean-boolean-boolean-boolean-} +``` +public FileLogger(String fileName, boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled) +``` + + +Creates a logger that logs messages to a file with specified logging levels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileName | java.lang.String | The full file name with path. | +| isTraceEnabled | boolean | Specifies whether trace level logging is enabled. | +| isDebugEnabled | boolean | Specifies whether debug level logging is enabled. | +| isWarningEnabled | boolean | Specifies whether warning level logging is enabled. | +| isErrorEnabled | boolean | Specifies whether error level logging is enabled. | + +### MESSAGE {#MESSAGE} +``` +public static final String MESSAGE +``` + + +### EXCEPTION {#EXCEPTION} +``` +public static final String EXCEPTION +``` + + +### trace(String message, Object[] arguments) {#trace-java.lang.String-java.lang.Object...-} +``` +public void trace(String message, Object[] arguments) +``` + + +Writes a trace message to the console. Trace log messages provide generally useful information about application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The trace message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in order of passing. | + +### trace(Throwable throwable, String message, Object[] arguments) {#trace-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public void trace(Throwable throwable, String message, Object[] arguments) +``` + + +Writes a trace log message to the console. Trace log messages provide generally useful information about the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the trace log message. | +| message | java.lang.String | The trace log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isTraceEnabled() {#isTraceEnabled--} +``` +public boolean isTraceEnabled() +``` + + +Checks if the trace level is enabled for logging. + +**Returns:** +boolean - true if the trace level is enabled, false otherwise. +### debug(String message, Object[] arguments) {#debug-java.lang.String-java.lang.Object...-} +``` +public void debug(String message, Object[] arguments) +``` + + +Writes a debug log message to the console. Debug log messages provide information about different processes in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The debug log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### debug(Throwable throwable, String message, Object[] arguments) {#debug-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public void debug(Throwable throwable, String message, Object[] arguments) +``` + + +Writes a debug log message to the console. Debug log messages provide information about different processes in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the debug log message. | +| message | java.lang.String | The debug log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isDebugEnabled() {#isDebugEnabled--} +``` +public boolean isDebugEnabled() +``` + + +Checks if the debug level is enabled for logging. + +**Returns:** +boolean - true if the debug level is enabled, false otherwise. +### warning(String message, Object[] arguments) {#warning-java.lang.String-java.lang.Object...-} +``` +public void warning(String message, Object[] arguments) +``` + + +Writes a warning log message to the console. Warning log messages provide information about unexpected and recoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The warning log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### warning(Throwable throwable, String message, Object[] arguments) {#warning-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public void warning(Throwable throwable, String message, Object[] arguments) +``` + + +Writes a warning log message to the console. Warning log messages provide information about unexpected and recoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the warning log message. | +| message | java.lang.String | The warning log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isWarningEnabled() {#isWarningEnabled--} +``` +public boolean isWarningEnabled() +``` + + +Checks if the warning level is enabled for logging. + +**Returns:** +boolean - true if the warning level is enabled, false otherwise. +### error(String message, Object[] arguments) {#error-java.lang.String-java.lang.Object...-} +``` +public void error(String message, Object[] arguments) +``` + + +Writes an error log message to the console. Error log messages provide information about unrecoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The error log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### error(Throwable throwable, String message, Object[] arguments) {#error-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public void error(Throwable throwable, String message, Object[] arguments) +``` + + +Writes an error log message to the console. Error log messages provide information about unrecoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the error log message. | +| message | java.lang.String | The error log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isErrorEnabled() {#isErrorEnabled--} +``` +public boolean isErrorEnabled() +``` + + +Checks if error-level logging is enabled. + +**Returns:** +boolean - true if error-level logging is enabled, false otherwise. diff --git a/english/nodejs-java/com.groupdocs.viewer.logging/viewerlogger/_index.md b/english/nodejs-java/com.groupdocs.viewer.logging/viewerlogger/_index.md new file mode 100644 index 00000000..9c0cef85 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.logging/viewerlogger/_index.md @@ -0,0 +1,242 @@ +--- +title: ViewerLogger +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Global viewer logger. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer.logging/viewerlogger/ +--- +**Inheritance:** +java.lang.Object +``` +public class ViewerLogger +``` + +Global viewer logger. + +The ViewerLogger class provides functionality to log messages to an integrated or user-defined logger. It serves as the global logger for the viewer module and can be used to log various events and messages. + +Example usage: + +``` + + // Configure the viewer logger to use the default integrated logger + ViewerLogger.setLogger(new FileLogger("/path/to/file.log")); + + // Log an debug message + ViewerLogger.debug("Debug message"); + + // Log an error message + ViewerLogger.error("Error message"); + +``` + +***Note:** The ViewerLogger class can be configured to use a custom logger implementation by calling the [setLogger(ILogger)](../../com.groupdocs.viewer.logging/viewerlogger\#setLogger-ILogger-) method. By default, it uses the integrated logger provided by the viewer module.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [ViewerLogger()](#ViewerLogger--) | | +## Methods + +| Method | Description | +| --- | --- | +| [trace(String message, Object[] arguments)](#trace-java.lang.String-java.lang.Object...-) | Writes a trace message to the console. | +| [trace(Throwable throwable, String message, Object[] arguments)](#trace-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes a trace log message to the console. | +| [isTraceEnabled()](#isTraceEnabled--) | Checks if the trace level is enabled for logging. | +| [debug(String message, Object[] arguments)](#debug-java.lang.String-java.lang.Object...-) | Writes a debug log message to the console. | +| [debug(Throwable throwable, String message, Object[] arguments)](#debug-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes a debug log message to the console. | +| [isDebugEnabled()](#isDebugEnabled--) | Checks if the debug level is enabled for logging. | +| [warning(String message, Object[] arguments)](#warning-java.lang.String-java.lang.Object...-) | Writes a warning log message to the console. | +| [warning(Throwable throwable, String message, Object[] arguments)](#warning-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes a warning log message to the console. | +| [isWarningEnabled()](#isWarningEnabled--) | Checks if the warning level is enabled for logging. | +| [error(String message, Object[] arguments)](#error-java.lang.String-java.lang.Object...-) | Writes an error log message to the console. | +| [error(Throwable throwable, String message, Object[] arguments)](#error-java.lang.Throwable-java.lang.String-java.lang.Object...-) | Writes an error log message to the console. | +| [isErrorEnabled()](#isErrorEnabled--) | Checks if error-level logging is enabled. | +| [getLogger()](#getLogger--) | Gets the logger instance that will be used for logging messages. | +| [setLogger(ILogger logger)](#setLogger-com.groupdocs.foundation.logging.ILogger-) | Sets the logger instance that will be used for logging messages. | +### ViewerLogger() {#ViewerLogger--} +``` +public ViewerLogger() +``` + + +### trace(String message, Object[] arguments) {#trace-java.lang.String-java.lang.Object...-} +``` +public static void trace(String message, Object[] arguments) +``` + + +Writes a trace message to the console. Trace log messages provide generally useful information about application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The trace message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in order of passing. | + +### trace(Throwable throwable, String message, Object[] arguments) {#trace-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public static void trace(Throwable throwable, String message, Object[] arguments) +``` + + +Writes a trace log message to the console. Trace log messages provide generally useful information about the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the trace log message. | +| message | java.lang.String | The trace log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isTraceEnabled() {#isTraceEnabled--} +``` +public static boolean isTraceEnabled() +``` + + +Checks if the trace level is enabled for logging. + +**Returns:** +boolean - true if the trace level is enabled, false otherwise. +### debug(String message, Object[] arguments) {#debug-java.lang.String-java.lang.Object...-} +``` +public static void debug(String message, Object[] arguments) +``` + + +Writes a debug log message to the console. Debug log messages provide information about different processes in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The debug log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### debug(Throwable throwable, String message, Object[] arguments) {#debug-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public static void debug(Throwable throwable, String message, Object[] arguments) +``` + + +Writes a debug log message to the console. Debug log messages provide information about different processes in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the debug log message. | +| message | java.lang.String | The debug log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isDebugEnabled() {#isDebugEnabled--} +``` +public static boolean isDebugEnabled() +``` + + +Checks if the debug level is enabled for logging. + +**Returns:** +boolean - true if the debug level is enabled, false otherwise. +### warning(String message, Object[] arguments) {#warning-java.lang.String-java.lang.Object...-} +``` +public static void warning(String message, Object[] arguments) +``` + + +Writes a warning log message to the console. Warning log messages provide information about unexpected and recoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The warning log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### warning(Throwable throwable, String message, Object[] arguments) {#warning-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public static void warning(Throwable throwable, String message, Object[] arguments) +``` + + +Writes a warning log message to the console. Warning log messages provide information about unexpected and recoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the warning log message. | +| message | java.lang.String | The warning log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isWarningEnabled() {#isWarningEnabled--} +``` +public static boolean isWarningEnabled() +``` + + +Checks if the warning level is enabled for logging. + +**Returns:** +boolean - true if the warning level is enabled, false otherwise. +### error(String message, Object[] arguments) {#error-java.lang.String-java.lang.Object...-} +``` +public static void error(String message, Object[] arguments) +``` + + +Writes an error log message to the console. Error log messages provide information about unrecoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| message | java.lang.String | The error log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### error(Throwable throwable, String message, Object[] arguments) {#error-java.lang.Throwable-java.lang.String-java.lang.Object...-} +``` +public static void error(Throwable throwable, String message, Object[] arguments) +``` + + +Writes an error log message to the console. Error log messages provide information about unrecoverable events in the application flow. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| throwable | java.lang.Throwable | The exception associated with the error log message. | +| message | java.lang.String | The error log message. | +| arguments | java.lang.Object[] | The arguments to be replaced in the message. They will replace \{\} placeholders in the order they are passed. | + +### isErrorEnabled() {#isErrorEnabled--} +``` +public static boolean isErrorEnabled() +``` + + +Checks if error-level logging is enabled. + +**Returns:** +boolean - true if error-level logging is enabled, false otherwise. +### getLogger() {#getLogger--} +``` +public static synchronized ILogger getLogger() +``` + + +Gets the logger instance that will be used for logging messages. The logger instance can be used to log messages of different levels such as trace, debug, warning, and error. + +**Returns:** +com.groupdocs.foundation.logging.ILogger - the logger instance. +### setLogger(ILogger logger) {#setLogger-com.groupdocs.foundation.logging.ILogger-} +``` +public static synchronized void setLogger(ILogger logger) +``` + + +Sets the logger instance that will be used for logging messages. The logger instance can be used to log messages of different levels such as trace, debug, warning, and error. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| logger | com.groupdocs.foundation.logging.ILogger | The logger instance to set. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/_index.md new file mode 100644 index 00000000..59da1de0 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/_index.md @@ -0,0 +1,67 @@ +--- +title: com.groupdocs.viewer.options +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides classes to specify additional options when rendering documents. +type: docs +weight: 15 +url: /nodejs-java/com.groupdocs.viewer.options/ +--- + +The package provides classes to specify additional options when rendering documents. + +It includes options for rendering various document formats, defining permissions and security settings, specifying watermark properties, and retrieving information about views. + +The main classes in this package are: + + * [ArchiveOptions](../../com.groupdocs.viewer.options/archiveoptions) - Provides options for rendering archive files. + * [PdfOptions](../../com.groupdocs.viewer.options/pdfoptions) - Provides options for rendering PDF documents. + * [WordProcessingOptions](../../com.groupdocs.viewer.options/wordprocessingoptions) - Provides options for rendering word processing documents. + +For more details on configuring the logging system in GroupDocs.Viewer and customizing the log message handling, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [ArchiveOptions](../com.groupdocs.viewer.options/archiveoptions) | Provides options for rendering archive files. | +| [ArchiveSecurityOptions](../com.groupdocs.viewer.options/archivesecurityoptions) | Class that can be used to limit the archives extraction process. | +| [BaseViewOptions](../com.groupdocs.viewer.options/baseviewoptions) | Class that provides base rendering options. | +| [CadOptions](../com.groupdocs.viewer.options/cadoptions) | Provides options for rendering CAD drawings. | +| [EmailOptions](../com.groupdocs.viewer.options/emailoptions) | Provides options for rendering email messages. | +| [FileName](../com.groupdocs.viewer.options/filename) | Represents the name of a file in an archive. | +| [HtmlViewOptions](../com.groupdocs.viewer.options/htmlviewoptions) | Provides options for rendering documents into HTML format. | +| [JpgViewOptions](../com.groupdocs.viewer.options/jpgviewoptions) | Provides options for rendering documents into JPG format. | +| [LoadOptions](../com.groupdocs.viewer.options/loadoptions) | Provides options that are used to open a file. | +| [MailStorageOptions](../com.groupdocs.viewer.options/mailstorageoptions) | Provides options for rendering Mail storage (Lotus Notes, MBox) data files. | +| [OutlookOptions](../com.groupdocs.viewer.options/outlookoptions) | Provides options for rendering Outlook data files. | +| [PdfOptions](../com.groupdocs.viewer.options/pdfoptions) | Provides options for rendering PDF documents. | +| [PdfViewOptions](../com.groupdocs.viewer.options/pdfviewoptions) | Provides options for rendering documents into PDF format. | +| [Permissions](../com.groupdocs.viewer.options/permissions) | Defines PDF document permissions. | +| [PngViewOptions](../com.groupdocs.viewer.options/pngviewoptions) | Provides options for rendering documents into PNG format. | +| [ProjectManagementOptions](../com.groupdocs.viewer.options/projectmanagementoptions) | Provides options for rendering project management files. | +| [Security](../com.groupdocs.viewer.options/security) | Provides PDF document security options. | +| [Size](../com.groupdocs.viewer.options/size) | Watermark size. | +| [SpreadsheetOptions](../com.groupdocs.viewer.options/spreadsheetoptions) | Provides options for rendering spreadsheets. | +| [TextOptions](../com.groupdocs.viewer.options/textoptions) | Text files splitting to pages options. | +| [Tile](../com.groupdocs.viewer.options/tile) | Represents drawing region. | +| [ViewInfoOptions](../com.groupdocs.viewer.options/viewinfooptions) | Provides options used for retrieving information about view. | +| [ViewOptions](../com.groupdocs.viewer.options/viewoptions) | Provides rendering options. | +| [VisioRenderingOptions](../com.groupdocs.viewer.options/visiorenderingoptions) | The Visio files processing documents view options. | +| [Watermark](../com.groupdocs.viewer.options/watermark) | Represents text watermark. | +| [WordProcessingOptions](../com.groupdocs.viewer.options/wordprocessingoptions) | Provides options for rendering word processing documents. | + +## Enumerations + +| Enum | Description | +| --- | --- | +| [Field](../com.groupdocs.viewer.options/field) | Represents email message fields e.g. From, To, Subject etc. | +| [ImageQuality](../com.groupdocs.viewer.options/imagequality) | The quality of images in the output HTML contained by the PDF documents. | +| [PageSize](../com.groupdocs.viewer.options/pagesize) | The size of the page. | +| [Position](../com.groupdocs.viewer.options/position) | Defines watermark position. | +| [Rotation](../com.groupdocs.viewer.options/rotation) | Defines page rotation in degrees. | +| [TextOverflowMode](../com.groupdocs.viewer.options/textoverflowmode) | Defines text overflow mode for rendering spreadsheet documents into HTML. | +| [TimeUnit](../com.groupdocs.viewer.options/timeunit) | Time unit of the project duration. | diff --git a/english/nodejs-java/com.groupdocs.viewer.options/archiveoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/archiveoptions/_index.md new file mode 100644 index 00000000..069f61fd --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/archiveoptions/_index.md @@ -0,0 +1,128 @@ +--- +title: ArchiveOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering archive files. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer.options/archiveoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class ArchiveOptions +``` + +Provides options for rendering archive files. + +The ArchiveOptions class represents a set of options that can be used to configure the rendering of archive files in the viewer module. It allows you to customize various aspects of the rendering process, such as the count of items on each page and so on. + +Example usage: + +``` + + // Create an instance of ArchiveOptions + ArchiveOptions options = new ArchiveOptions(); + + // Set the count of items to be shown on each page + options.setItemsPerPage(16); + + // Create a Viewer instance with the specified options + try (final Viewer viewer = new Viewer(documentPath, options)) { + // Use the viewer object for document rendering + } + +``` + +***Note:** The ArchiveOptions class provides a range of customization options for rendering archive files. You can configure these options based on your specific requirements to achieve the desired output.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [ArchiveOptions()](#ArchiveOptions--) | Creates a new instance of the ArchiveOptions class with default settings. | +## Methods + +| Method | Description | +| --- | --- | +| [getFolder()](#getFolder--) | Gets the folder inside the archive that will be used for rendering. | +| [setFolder(String value)](#setFolder-java.lang.String-) | Sets the folder inside the archive that will be used for rendering. | +| [getFileName()](#getFileName--) | Gets the filename to be displayed in the header. | +| [setFileName(FileName fileName)](#setFileName-com.groupdocs.viewer.options.FileName-) | Sets the filename to be displayed in the header. | +| [getItemsPerPage()](#getItemsPerPage--) | Gets the number of records per page for rendering to HTML. | +| [setItemsPerPage(int itemsPerPage)](#setItemsPerPage-int-) | Sets the number of records per page for rendering to HTML. | +### ArchiveOptions() {#ArchiveOptions--} +``` +public ArchiveOptions() +``` + + +Creates a new instance of the ArchiveOptions class with default settings. + +### getFolder() {#getFolder--} +``` +public final String getFolder() +``` + + +Gets the folder inside the archive that will be used for rendering. + +**Returns:** +java.lang.String - the folder to be rendered. +### setFolder(String value) {#setFolder-java.lang.String-} +``` +public final void setFolder(String value) +``` + + +Sets the folder inside the archive that will be used for rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The folder to be rendered. | + +### getFileName() {#getFileName--} +``` +public FileName getFileName() +``` + + +Gets the filename to be displayed in the header. By default, the name of the source file is displayed. + +**Returns:** +[FileName](../../com.groupdocs.viewer.options/filename) - the filename to be displayed. +### setFileName(FileName fileName) {#setFileName-com.groupdocs.viewer.options.FileName-} +``` +public void setFileName(FileName fileName) +``` + + +Sets the filename to be displayed in the header. By default, the name of the source file is displayed. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileName | [FileName](../../com.groupdocs.viewer.options/filename) | The filename to be displayed. | + +### getItemsPerPage() {#getItemsPerPage--} +``` +public int getItemsPerPage() +``` + + +Gets the number of records per page for rendering to HTML. + +**Returns:** +int - the number of records per page. +### setItemsPerPage(int itemsPerPage) {#setItemsPerPage-int-} +``` +public void setItemsPerPage(int itemsPerPage) +``` + + +Sets the number of records per page for rendering to HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| itemsPerPage | int | The number of records per page. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/archivesecurityoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/archivesecurityoptions/_index.md new file mode 100644 index 00000000..ef738830 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/archivesecurityoptions/_index.md @@ -0,0 +1,170 @@ +--- +title: ArchiveSecurityOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Class that can be used to limit the archives extraction process. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer.options/archivesecurityoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class ArchiveSecurityOptions +``` + +Class that can be used to limit the archives extraction process. + +The ArchiveSecurityOptions class provides a way to limit the extraction of archives and enforce certain restrictions. + +Example usage: + +``` + + ArchiveSecurityOptions securityOptions = new ArchiveSecurityOptions(); + securityOptions.setMaxAllowedEntryNameLength(255); + securityOptions.setMaxAllowedEntrySize(10737418240L); + securityOptions.setMaxAllowedEntriesCount(1000); + securityOptions.setMaxAllowedEntryCompressionRatio(100); + + final LoadOptions loadOptions = new LoadOptions(); + loadOptions.setArchiveSecurityOptions(securityOptions); + + // Create a Viewer instance with the specified options + try (final Viewer viewer = new Viewer(documentPath, loadOptions)) { + // Use the viewer object for archive document rendering + } + +``` + +***Note:** Not each archive type supports all options.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [ArchiveSecurityOptions()](#ArchiveSecurityOptions--) | | +## Methods + +| Method | Description | +| --- | --- | +| [getMaxAllowedEntryNameLength()](#getMaxAllowedEntryNameLength--) | This option specifies the maximum length that an archive entry name can have. | +| [setMaxAllowedEntryNameLength(int maxAllowedEntryNameLength)](#setMaxAllowedEntryNameLength-int-) | Sets the maximum allowed length for the archive entry names. | +| [getMaxAllowedEntrySize()](#getMaxAllowedEntrySize--) | Retrieves the maximum allowed size for archive entries. | +| [setMaxAllowedEntrySize(long maxAllowedEntrySize)](#setMaxAllowedEntrySize-long-) | Sets the maximum allowed size for archive entries. | +| [getMaxAllowedEntriesCount()](#getMaxAllowedEntriesCount--) | Retrieves the maximum allowed count of entries in an archive. | +| [setMaxAllowedEntriesCount(long maxAllowedEntriesCount)](#setMaxAllowedEntriesCount-long-) | Sets the maximum allowed count of entries in an archive. | +| [getMaxAllowedEntryCompressionRatio()](#getMaxAllowedEntryCompressionRatio--) | Specifies the maximum compression ratio allowed for extracting archive entries. | +| [setMaxAllowedEntryCompressionRatio(double maxAllowedEntryCompressionRatio)](#setMaxAllowedEntryCompressionRatio-double-) | Specifies the maximum compression ratio allowed for extracting archive entries. | +### ArchiveSecurityOptions() {#ArchiveSecurityOptions--} +``` +public ArchiveSecurityOptions() +``` + + +### getMaxAllowedEntryNameLength() {#getMaxAllowedEntryNameLength--} +``` +public int getMaxAllowedEntryNameLength() +``` + + +This option specifies the maximum length that an archive entry name can have. If an entry name exceeds this limit, it will cause an error. + +***Note:** The default value for this option is 255.* + +**Returns:** +int - the maximum allowed length for the archive entry names. +### setMaxAllowedEntryNameLength(int maxAllowedEntryNameLength) {#setMaxAllowedEntryNameLength-int-} +``` +public void setMaxAllowedEntryNameLength(int maxAllowedEntryNameLength) +``` + + +Sets the maximum allowed length for the archive entry names. The maximum allowed length specifies the limit for the length of an archive entry name. If the length of an entry name exceeds this limit, it will cause an error. + +***Note:** The default value for the maximum allowed entry name length is 255.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxAllowedEntryNameLength | int | The maximum archive entry name length to be set. | + +### getMaxAllowedEntrySize() {#getMaxAllowedEntrySize--} +``` +public long getMaxAllowedEntrySize() +``` + + +Retrieves the maximum allowed size for archive entries. The maximum allowed entry size specifies the limit for the size of an archive entry. If the size of an entry exceeds this limit, it will result in an error. + +***Note:** The default value for the maximum allowed entry size is 10GB (10737418240 bytes).* + +**Returns:** +long - the maximum archive entry size. +### setMaxAllowedEntrySize(long maxAllowedEntrySize) {#setMaxAllowedEntrySize-long-} +``` +public void setMaxAllowedEntrySize(long maxAllowedEntrySize) +``` + + +Sets the maximum allowed size for archive entries. The maximum allowed entry size specifies the limit for the size of an archive entry. If the size of an entry exceeds this limit, it will result in an error. + +***Note:** The default value for the maximum allowed entry size is 10GB (10737418240 bytes).* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxAllowedEntrySize | long | The maximum archive entry size. | + +### getMaxAllowedEntriesCount() {#getMaxAllowedEntriesCount--} +``` +public long getMaxAllowedEntriesCount() +``` + + +Retrieves the maximum allowed count of entries in an archive. The maximum allowed entries count specifies the limit for the number of entries that an archive can contain. If an archive contains more entries than this limit, it cannot be extracted. + +***Note:** The default value for the maximum allowed entries count is 1000.* + +**Returns:** +long - the maximum count of entries in an archive. +### setMaxAllowedEntriesCount(long maxAllowedEntriesCount) {#setMaxAllowedEntriesCount-long-} +``` +public void setMaxAllowedEntriesCount(long maxAllowedEntriesCount) +``` + + +Sets the maximum allowed count of entries in an archive. The maximum allowed entries count specifies the limit for the number of entries that an archive can contain. If an archive contains more entries than this limit, it cannot be extracted. + +***Note:** The default value for the maximum allowed entries count is 1000.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxAllowedEntriesCount | long | The maximum count of entries in an archive. | + +### getMaxAllowedEntryCompressionRatio() {#getMaxAllowedEntryCompressionRatio--} +``` +public double getMaxAllowedEntryCompressionRatio() +``` + + +Specifies the maximum compression ratio allowed for extracting archive entries. + +***Note:** Archive entries with a compression ratio higher than the specified value cannot be extracted.* + +**Returns:** +double - the maximum allowed compression ratio for archive entries. +### setMaxAllowedEntryCompressionRatio(double maxAllowedEntryCompressionRatio) {#setMaxAllowedEntryCompressionRatio-double-} +``` +public void setMaxAllowedEntryCompressionRatio(double maxAllowedEntryCompressionRatio) +``` + + +Specifies the maximum compression ratio allowed for extracting archive entries. + +***Note:** Archive entries with a compression ratio higher than the specified value cannot be extracted.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxAllowedEntryCompressionRatio | double | The maximum allowed compression ratio for archive entries. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/baseviewoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/baseviewoptions/_index.md new file mode 100644 index 00000000..c6c53b2f --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/baseviewoptions/_index.md @@ -0,0 +1,480 @@ +--- +title: BaseViewOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Class that provides base rendering options. +type: docs +weight: 12 +url: /nodejs-java/com.groupdocs.viewer.options/baseviewoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public abstract class BaseViewOptions +``` + +Class that provides base rendering options. + +The BaseViewOptions class serves as the base for rendering options in GroupDocs.Viewer. It allows you to customize the rendering behavior of the output HTML, PDF, PNG, and JPEG files when rendering specific document formats. + +***Note:** For internal usage.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [BaseViewOptions()](#BaseViewOptions--) | | +## Methods + +| Method | Description | +| --- | --- | +| [getTextOptions()](#getTextOptions--) | Retrieves the options for splitting text files into pages. | +| [setTextOptions(TextOptions textOptions)](#setTextOptions-com.groupdocs.viewer.options.TextOptions-) | Sets the options for splitting text files into pages. | +| [isRenderComments()](#isRenderComments--) | Enables rendering comments. | +| [setRenderComments(boolean value)](#setRenderComments-boolean-) | Enables rendering comments. | +| [isRenderNotes()](#isRenderNotes--) | Enables rendering notes. | +| [setRenderNotes(boolean value)](#setRenderNotes-boolean-) | Enables rendering notes. | +| [isRenderHiddenPages()](#isRenderHiddenPages--) | Enables rendering of hidden pages. | +| [setRenderHiddenPages(boolean value)](#setRenderHiddenPages-boolean-) | Enables rendering of hidden pages. | +| [getDefaultFontName()](#getDefaultFontName--) | Default font to be used when a particular font used in the document can't be found. | +| [setDefaultFontName(String value)](#setDefaultFontName-java.lang.String-) | Default font to be used when a particular font used in the document can't be found. | +| [getArchiveOptions()](#getArchiveOptions--) | Retrieves the archive files view options. | +| [setArchiveOptions(ArchiveOptions value)](#setArchiveOptions-com.groupdocs.viewer.options.ArchiveOptions-) | Sets the archive files view options. | +| [getCadOptions()](#getCadOptions--) | Retrieves the CAD drawing view options. | +| [setCadOptions(CadOptions value)](#setCadOptions-com.groupdocs.viewer.options.CadOptions-) | Sets the CAD drawing view options. | +| [isCadOptionsInitialized_Internal()](#isCadOptionsInitialized-Internal--) | | +| [getEmailOptions()](#getEmailOptions--) | Retrieves the email messages view options. | +| [setEmailOptions(EmailOptions value)](#setEmailOptions-com.groupdocs.viewer.options.EmailOptions-) | Sets the email messages view options. | +| [getOutlookOptions()](#getOutlookOptions--) | Retrieves the MS Outlook data files view options. | +| [setOutlookOptions(OutlookOptions value)](#setOutlookOptions-com.groupdocs.viewer.options.OutlookOptions-) | Sets the MS Outlook data files view options. | +| [getPdfOptions()](#getPdfOptions--) | Retrieves the PDF documents view options. | +| [setPdfOptions(PdfOptions value)](#setPdfOptions-com.groupdocs.viewer.options.PdfOptions-) | Retrieves the PDF documents view options. | +| [getMailStorageOptions()](#getMailStorageOptions--) | Retrieves the Lotus Notes storage data files view options. | +| [setMailStorageOptions(MailStorageOptions mailStorageOptions)](#setMailStorageOptions-com.groupdocs.viewer.options.MailStorageOptions-) | Sets the Lotus Notes storage data files view options. | +| [getProjectManagementOptions()](#getProjectManagementOptions--) | Retrieves the project management files view options. | +| [setProjectManagementOptions(ProjectManagementOptions projectManagementOptions)](#setProjectManagementOptions-com.groupdocs.viewer.options.ProjectManagementOptions-) | Sets the project management files view options. | +| [getSpreadsheetOptions()](#getSpreadsheetOptions--) | Retrieves the spreadsheet files view options. | +| [setSpreadsheetOptions(SpreadsheetOptions value)](#setSpreadsheetOptions-com.groupdocs.viewer.options.SpreadsheetOptions-) | Sets the spreadsheet files view options. | +| [getWordProcessingOptions()](#getWordProcessingOptions--) | Retrieves the rendering options for customizing the appearance of the output HTML/PDF/PNG/JPEG when rendering Word documents. | +| [setWordProcessingOptions(WordProcessingOptions wordProcessingOptions)](#setWordProcessingOptions-com.groupdocs.viewer.options.WordProcessingOptions-) | Sets the rendering options for customizing the appearance of the output HTML/PDF/PNG/JPEG when rendering Word documents. | +| [getVisioRenderingOptions()](#getVisioRenderingOptions--) | Retrieves the rendering options for processing Visio files when viewing documents. | +| [setVisioRenderingOptions(VisioRenderingOptions visioRenderingOptions)](#setVisioRenderingOptions-com.groupdocs.viewer.options.VisioRenderingOptions-) | Sets the rendering options for processing Visio files when viewing documents. | +| [getPresentationOptions()](#getPresentationOptions--) | Retrieves the view options for processing presentation documents. | +| [setPresentationOptions(PresentationOptions presentationOptions)](#setPresentationOptions-com.groupdocs.viewer.options.PresentationOptions-) | Sets the view options for processing presentation documents. | +| [getWebDocumentOptions()](#getWebDocumentOptions--) | Gets the rendering options that allow customization of the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents. | +| [setWebDocumentOptions(WebDocumentOptions webDocumentOptions)](#setWebDocumentOptions-com.groupdocs.viewer.options.WebDocumentOptions-) | Sets the rendering options that allow customization of the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents. | +### BaseViewOptions() {#BaseViewOptions--} +``` +public BaseViewOptions() +``` + + +### getTextOptions() {#getTextOptions--} +``` +public TextOptions getTextOptions() +``` + + +Retrieves the options for splitting text files into pages. + +**Returns:** +[TextOptions](../../com.groupdocs.viewer.options/textoptions) - the text file splitting options. +### setTextOptions(TextOptions textOptions) {#setTextOptions-com.groupdocs.viewer.options.TextOptions-} +``` +public void setTextOptions(TextOptions textOptions) +``` + + +Sets the options for splitting text files into pages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| textOptions | [TextOptions](../../com.groupdocs.viewer.options/textoptions) | The text file splitting options. | + +### isRenderComments() {#isRenderComments--} +``` +public final boolean isRenderComments() +``` + + +Enables rendering comments. + +**Returns:** +boolean - true if comments should be rendered, false otherwise. +### setRenderComments(boolean value) {#setRenderComments-boolean-} +``` +public final void setRenderComments(boolean value) +``` + + +Enables rendering comments. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true if comments should be rendered, false otherwise. | + +### isRenderNotes() {#isRenderNotes--} +``` +public final boolean isRenderNotes() +``` + + +Enables rendering notes. + +**Returns:** +boolean - true if notes should be rendered, false otherwise. +### setRenderNotes(boolean value) {#setRenderNotes-boolean-} +``` +public final void setRenderNotes(boolean value) +``` + + +Enables rendering notes. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true if notes should be rendered, false otherwise. | + +### isRenderHiddenPages() {#isRenderHiddenPages--} +``` +public final boolean isRenderHiddenPages() +``` + + +Enables rendering of hidden pages. + +**Returns:** +boolean - true if hidden pages should be rendered, false otherwise. +### setRenderHiddenPages(boolean value) {#setRenderHiddenPages-boolean-} +``` +public final void setRenderHiddenPages(boolean value) +``` + + +Enables rendering of hidden pages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true if hidden pages should be rendered, false otherwise. | + +### getDefaultFontName() {#getDefaultFontName--} +``` +public final String getDefaultFontName() +``` + + +Default font to be used when a particular font used in the document can't be found. + +**Returns:** +java.lang.String - the name of the default font. +### setDefaultFontName(String value) {#setDefaultFontName-java.lang.String-} +``` +public final void setDefaultFontName(String value) +``` + + +Default font to be used when a particular font used in the document can't be found. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The name of the default font. | + +### getArchiveOptions() {#getArchiveOptions--} +``` +public final ArchiveOptions getArchiveOptions() +``` + + +Retrieves the archive files view options. + +**Returns:** +[ArchiveOptions](../../com.groupdocs.viewer.options/archiveoptions) - the archive files view options. +### setArchiveOptions(ArchiveOptions value) {#setArchiveOptions-com.groupdocs.viewer.options.ArchiveOptions-} +``` +public final void setArchiveOptions(ArchiveOptions value) +``` + + +Sets the archive files view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [ArchiveOptions](../../com.groupdocs.viewer.options/archiveoptions) | The archive files view options. | + +### getCadOptions() {#getCadOptions--} +``` +public final CadOptions getCadOptions() +``` + + +Retrieves the CAD drawing view options. + +**Returns:** +[CadOptions](../../com.groupdocs.viewer.options/cadoptions) - the CAD drawing view options. +### setCadOptions(CadOptions value) {#setCadOptions-com.groupdocs.viewer.options.CadOptions-} +``` +public final void setCadOptions(CadOptions value) +``` + + +Sets the CAD drawing view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [CadOptions](../../com.groupdocs.viewer.options/cadoptions) | The CAD drawing view options. | + +### isCadOptionsInitialized_Internal() {#isCadOptionsInitialized-Internal--} +``` +public boolean isCadOptionsInitialized_Internal() +``` + + + + +**Returns:** +boolean +### getEmailOptions() {#getEmailOptions--} +``` +public final EmailOptions getEmailOptions() +``` + + +Retrieves the email messages view options. + +**Returns:** +[EmailOptions](../../com.groupdocs.viewer.options/emailoptions) - Email messages view options. +### setEmailOptions(EmailOptions value) {#setEmailOptions-com.groupdocs.viewer.options.EmailOptions-} +``` +public final void setEmailOptions(EmailOptions value) +``` + + +Sets the email messages view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [EmailOptions](../../com.groupdocs.viewer.options/emailoptions) | Email messages view options. | + +### getOutlookOptions() {#getOutlookOptions--} +``` +public final OutlookOptions getOutlookOptions() +``` + + +Retrieves the MS Outlook data files view options. + +**Returns:** +[OutlookOptions](../../com.groupdocs.viewer.options/outlookoptions) - MS Outlook data files view options. +### setOutlookOptions(OutlookOptions value) {#setOutlookOptions-com.groupdocs.viewer.options.OutlookOptions-} +``` +public final void setOutlookOptions(OutlookOptions value) +``` + + +Sets the MS Outlook data files view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [OutlookOptions](../../com.groupdocs.viewer.options/outlookoptions) | The MS Outlook data files view options to set. | + +### getPdfOptions() {#getPdfOptions--} +``` +public final PdfOptions getPdfOptions() +``` + + +Retrieves the PDF documents view options. + +**Returns:** +[PdfOptions](../../com.groupdocs.viewer.options/pdfoptions) - the PDF documents view options. +### setPdfOptions(PdfOptions value) {#setPdfOptions-com.groupdocs.viewer.options.PdfOptions-} +``` +public final void setPdfOptions(PdfOptions value) +``` + + +Retrieves the PDF documents view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [PdfOptions](../../com.groupdocs.viewer.options/pdfoptions) | The PDF documents view options. | + +### getMailStorageOptions() {#getMailStorageOptions--} +``` +public MailStorageOptions getMailStorageOptions() +``` + + +Retrieves the Lotus Notes storage data files view options. + +**Returns:** +[MailStorageOptions](../../com.groupdocs.viewer.options/mailstorageoptions) - the Lotus Notes storage data files view options. +### setMailStorageOptions(MailStorageOptions mailStorageOptions) {#setMailStorageOptions-com.groupdocs.viewer.options.MailStorageOptions-} +``` +public void setMailStorageOptions(MailStorageOptions mailStorageOptions) +``` + + +Sets the Lotus Notes storage data files view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| mailStorageOptions | [MailStorageOptions](../../com.groupdocs.viewer.options/mailstorageoptions) | The Lotus Notes storage data files view options. | + +### getProjectManagementOptions() {#getProjectManagementOptions--} +``` +public final ProjectManagementOptions getProjectManagementOptions() +``` + + +Retrieves the project management files view options. + +**Returns:** +[ProjectManagementOptions](../../com.groupdocs.viewer.options/projectmanagementoptions) - the project management files view options. +### setProjectManagementOptions(ProjectManagementOptions projectManagementOptions) {#setProjectManagementOptions-com.groupdocs.viewer.options.ProjectManagementOptions-} +``` +public final void setProjectManagementOptions(ProjectManagementOptions projectManagementOptions) +``` + + +Sets the project management files view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| projectManagementOptions | [ProjectManagementOptions](../../com.groupdocs.viewer.options/projectmanagementoptions) | The project management files view options to be set. | + +### getSpreadsheetOptions() {#getSpreadsheetOptions--} +``` +public final SpreadsheetOptions getSpreadsheetOptions() +``` + + +Retrieves the spreadsheet files view options. + +**Returns:** +[SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) - the spreadsheet files view options. +### setSpreadsheetOptions(SpreadsheetOptions value) {#setSpreadsheetOptions-com.groupdocs.viewer.options.SpreadsheetOptions-} +``` +public final void setSpreadsheetOptions(SpreadsheetOptions value) +``` + + +Sets the spreadsheet files view options. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) | The spreadsheet files view options. | + +### getWordProcessingOptions() {#getWordProcessingOptions--} +``` +public final WordProcessingOptions getWordProcessingOptions() +``` + + +Retrieves the rendering options for customizing the appearance of the output HTML/PDF/PNG/JPEG when rendering Word documents. + +***Note:** See also [Render Word documents as HTML, PDF, or image files][Render Word documents as HTML_ PDF_ or image files]* + + +[Render Word documents as HTML_ PDF_ or image files]: https://docs.groupdocs.com/viewer/java/how-to-view-word-documents-using-java/ + +**Returns:** +[WordProcessingOptions](../../com.groupdocs.viewer.options/wordprocessingoptions) - the Word processing options for rendering Word documents. +### setWordProcessingOptions(WordProcessingOptions wordProcessingOptions) {#setWordProcessingOptions-com.groupdocs.viewer.options.WordProcessingOptions-} +``` +public final void setWordProcessingOptions(WordProcessingOptions wordProcessingOptions) +``` + + +Sets the rendering options for customizing the appearance of the output HTML/PDF/PNG/JPEG when rendering Word documents. + +***Note:** See also [Render Word documents as HTML, PDF, or image files][Render Word documents as HTML_ PDF_ or image files]* + + +[Render Word documents as HTML_ PDF_ or image files]: https://docs.groupdocs.com/viewer/java/how-to-view-word-documents-using-java/ + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| wordProcessingOptions | [WordProcessingOptions](../../com.groupdocs.viewer.options/wordprocessingoptions) | The Word processing options for rendering Word documents. | + +### getVisioRenderingOptions() {#getVisioRenderingOptions--} +``` +public VisioRenderingOptions getVisioRenderingOptions() +``` + + +Retrieves the rendering options for processing Visio files when viewing documents. + +**Returns:** +[VisioRenderingOptions](../../com.groupdocs.viewer.options/visiorenderingoptions) - the Visio rendering options for processing Visio files. +### setVisioRenderingOptions(VisioRenderingOptions visioRenderingOptions) {#setVisioRenderingOptions-com.groupdocs.viewer.options.VisioRenderingOptions-} +``` +public void setVisioRenderingOptions(VisioRenderingOptions visioRenderingOptions) +``` + + +Sets the rendering options for processing Visio files when viewing documents. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| visioRenderingOptions | [VisioRenderingOptions](../../com.groupdocs.viewer.options/visiorenderingoptions) | The Visio rendering options for processing Visio files. | + +### getPresentationOptions() {#getPresentationOptions--} +``` +public PresentationOptions getPresentationOptions() +``` + + +Retrieves the view options for processing presentation documents. + +**Returns:** +com.groupdocs.viewer.options.PresentationOptions - the presentation view options for processing presentation documents. +### setPresentationOptions(PresentationOptions presentationOptions) {#setPresentationOptions-com.groupdocs.viewer.options.PresentationOptions-} +``` +public void setPresentationOptions(PresentationOptions presentationOptions) +``` + + +Sets the view options for processing presentation documents. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| presentationOptions | com.groupdocs.viewer.options.PresentationOptions | The presentation view options for processing presentation documents. | + +### getWebDocumentOptions() {#getWebDocumentOptions--} +``` +public WebDocumentOptions getWebDocumentOptions() +``` + + +Gets the rendering options that allow customization of the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents. + +**Returns:** +com.groupdocs.viewer.options.WebDocumentOptions - The WebDocumentOptions object for customizing the rendering options. +### setWebDocumentOptions(WebDocumentOptions webDocumentOptions) {#setWebDocumentOptions-com.groupdocs.viewer.options.WebDocumentOptions-} +``` +public void setWebDocumentOptions(WebDocumentOptions webDocumentOptions) +``` + + +Sets the rendering options that allow customization of the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| webDocumentOptions | com.groupdocs.viewer.options.WebDocumentOptions | The WebDocumentOptions object for customizing the rendering options. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/cadoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/cadoptions/_index.md new file mode 100644 index 00000000..0d131e18 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/cadoptions/_index.md @@ -0,0 +1,409 @@ +--- +title: CadOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering CAD drawings. +type: docs +weight: 13 +url: /nodejs-java/com.groupdocs.viewer.options/cadoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class CadOptions +``` + +Provides options for rendering CAD drawings. + +The CadOptions class encapsulates various settings and parameters that can be used to control the rendering of CAD drawings in the GroupDocs.Viewer component. + +Example usage: + +``` + + CadOptions options = CadOptions.forRenderingByWidth(256); + options.setRenderLayouts(true); + options.setBackgroundColor(Color.YELLOW); + options.setLayers(Arrays.asList( + CacheableFactory.getInstance().newLayer("Layer1"), + CacheableFactory.getInstance().newLayer("Layer2") + )); + + try (Viewer viewer = new Viewer("document.dwg")) { + PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setCadOptions(options); + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [WIDTH](#WIDTH) | | +| [HEIGHT](#HEIGHT) | | +## Methods + +| Method | Description | +| --- | --- | +| [getPc3File()](#getPc3File--) | Retrieves the PC3 (Plotter Configuration) file associated with the plotter. | +| [setPc3File(String pc3File)](#setPc3File-java.lang.String-) | Sets the PC3 (Plotter Configuration) file associated with the plotter. | +| [forRenderingByScaleFactor(double scaleFactor)](#forRenderingByScaleFactor-double-) | Initializes a new instance of the CadOptions class for rendering by scale factor. | +| [forRenderingByWidth(int width)](#forRenderingByWidth-int-) | Initializes a new instance of the CadOptions class for rendering by width. | +| [forRenderingByHeight(int height)](#forRenderingByHeight-int-) | Initializes a new instance of the CadOptions class for rendering by height. | +| [forRenderingByWidthAndHeight(int width, int height)](#forRenderingByWidthAndHeight-int-int-) | Initializes a new instance of the CadOptions class for rendering by width and height. | +| [getScaleFactor()](#getScaleFactor--) | Gets the scale factor for rendering. | +| [getWidth()](#getWidth--) | Gets the width of the output result in pixels. | +| [getHeight()](#getHeight--) | Gets the height of the output result in pixels. | +| [getBackgroundColor()](#getBackgroundColor--) | Gets the background color of the image. | +| [getBackgroundColorAsHex()](#getBackgroundColorAsHex--) | Gets the background color of the image. | +| [setBackgroundColor(Color backgroundColor)](#setBackgroundColor-java.awt.Color-) | Sets the background color of the image. | +| [setBackgroundColor(String colorName)](#setBackgroundColor-java.lang.String-) | Sets the background color of the image. | +| [getTiles()](#getTiles--) | Gets the drawing regions to render. | +| [setTiles(List value)](#setTiles-java.util.List-com.groupdocs.viewer.options.Tile--) | Sets the drawing regions to render. | +| [isRenderLayouts()](#isRenderLayouts--) | Indicates whether layouts from the CAD document should be rendered. | +| [setRenderLayouts(boolean value)](#setRenderLayouts-boolean-) | Sets whether layouts from the CAD document should be rendered. | +| [getLayoutName()](#getLayoutName--) | Gets the name of the specific layout to render. | +| [setLayoutName(String value)](#setLayoutName-java.lang.String-) | Sets the name of the specific layout to render. | +| [getLayers()](#getLayers--) | Gets the CAD drawing layers to render. | +| [setLayers(List value)](#setLayers-java.util.List-com.groupdocs.viewer.results.Layer--) | Gets the CAD drawing layers to render. | +| [equals(Object o)](#equals-java.lang.Object-) | Checks if this CadOptions object is equal to another object. | +| [hashCode()](#hashCode--) | \{@inheritDoc\} | +| [toString()](#toString--) | \{@inheritDoc\} | +| [toString(ToStringStyle style)](#toString-org.apache.commons.lang3.builder.ToStringStyle-) | \{@inheritDoc\} | +### WIDTH {#WIDTH} +``` +public static final String WIDTH +``` + + +### HEIGHT {#HEIGHT} +``` +public static final String HEIGHT +``` + + +### getPc3File() {#getPc3File--} +``` +public String getPc3File() +``` + + +Retrieves the PC3 (Plotter Configuration) file associated with the plotter. + +**Returns:** +java.lang.String - the PC3 file path. +### setPc3File(String pc3File) {#setPc3File-java.lang.String-} +``` +public void setPc3File(String pc3File) +``` + + +Sets the PC3 (Plotter Configuration) file associated with the plotter. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pc3File | java.lang.String | The PC3 file path. | + +### forRenderingByScaleFactor(double scaleFactor) {#forRenderingByScaleFactor-double-} +``` +public static CadOptions forRenderingByScaleFactor(double scaleFactor) +``` + + +Initializes a new instance of the CadOptions class for rendering by scale factor. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| scaleFactor | double | The scale factor for rendering. Values greater than 1 will enlarge the output result, while values between 0 and 1 will make the output result smaller. | + +**Returns:** +[CadOptions](../../com.groupdocs.viewer.options/cadoptions) - a new instance of the CadOptions class for rendering by scale factor. +### forRenderingByWidth(int width) {#forRenderingByWidth-int-} +``` +public static CadOptions forRenderingByWidth(int width) +``` + + +Initializes a new instance of the CadOptions class for rendering by width. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| width | int | The width of the output result in pixels. | + +**Returns:** +[CadOptions](../../com.groupdocs.viewer.options/cadoptions) - a new instance of the CadOptions class for rendering by width. +### forRenderingByHeight(int height) {#forRenderingByHeight-int-} +``` +public static CadOptions forRenderingByHeight(int height) +``` + + +Initializes a new instance of the CadOptions class for rendering by height. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| height | int | The height of the output result in pixels. | + +**Returns:** +[CadOptions](../../com.groupdocs.viewer.options/cadoptions) - a new instance of the CadOptions class for rendering by height. +### forRenderingByWidthAndHeight(int width, int height) {#forRenderingByWidthAndHeight-int-int-} +``` +public static CadOptions forRenderingByWidthAndHeight(int width, int height) +``` + + +Initializes a new instance of the CadOptions class for rendering by width and height. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| width | int | The width of the output result in pixels. | +| height | int | The height of the output result in pixels. | + +**Returns:** +[CadOptions](../../com.groupdocs.viewer.options/cadoptions) - a new instance of the CadOptions class for rendering by width and height. +### getScaleFactor() {#getScaleFactor--} +``` +public final double getScaleFactor() +``` + + +Gets the scale factor for rendering. Values higher than 1 will enlarge the output result, while values between 0 and 1 will make the output result smaller. + +**Returns:** +double - the scale factor for rendering. +### getWidth() {#getWidth--} +``` +public final int getWidth() +``` + + +Gets the width of the output result in pixels. + +**Returns:** +int - the width of the output result. +### getHeight() {#getHeight--} +``` +public final int getHeight() +``` + + +Gets the height of the output result in pixels. + +**Returns:** +int - the height of the output result. +### getBackgroundColor() {#getBackgroundColor--} +``` +public Color getBackgroundColor() +``` + + +Gets the background color of the image. + +**Returns:** +java.awt.Color - the background color of the image. +### getBackgroundColorAsHex() {#getBackgroundColorAsHex--} +``` +public String getBackgroundColorAsHex() +``` + + +Gets the background color of the image. + +**Returns:** +java.lang.String - the background color of the image in 0xFFFFFF format. +### setBackgroundColor(Color backgroundColor) {#setBackgroundColor-java.awt.Color-} +``` +public void setBackgroundColor(Color backgroundColor) +``` + + +Sets the background color of the image. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| backgroundColor | java.awt.Color | The background color of the image. | + +### setBackgroundColor(String colorName) {#setBackgroundColor-java.lang.String-} +``` +public void setBackgroundColor(String colorName) +``` + + +Sets the background color of the image. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| colorName | java.lang.String | The background color name of the image. | + +### getTiles() {#getTiles--} +``` +public final List getTiles() +``` + + +Gets the drawing regions to render. + +**Note:** This option is supported only for [FileType.DWG](../../com.groupdocs.viewer/filetype\#DWG) and [FileType.DWT](../../com.groupdocs.viewer/filetype\#DWT) file types. The RenderLayouts ([isRenderLayouts()](../../com.groupdocs.viewer.options/cadoptions\#isRenderLayouts--)/[setRenderLayouts(boolean)](../../com.groupdocs.viewer.options/cadoptions\#setRenderLayouts-boolean-)) and LayoutName ([getLayoutName()](../../com.groupdocs.viewer.options/cadoptions\#getLayoutName--)/[setLayoutName(String)](../../com.groupdocs.viewer.options/cadoptions\#setLayoutName-String-)) options are ignored when rendering by tiles. + +**Returns:** +java.util.List - the list of drawing regions to render. +### setTiles(List value) {#setTiles-java.util.List-com.groupdocs.viewer.options.Tile--} +``` +public final void setTiles(List value) +``` + + +Sets the drawing regions to render. + +**Note:** This option is supported only for [FileType.DWG](../../com.groupdocs.viewer/filetype\#DWG) and [FileType.DWT](../../com.groupdocs.viewer/filetype\#DWT) file types. The RenderLayouts ([isRenderLayouts()](../../com.groupdocs.viewer.options/cadoptions\#isRenderLayouts--)/[setRenderLayouts(boolean)](../../com.groupdocs.viewer.options/cadoptions\#setRenderLayouts-boolean-)) and LayoutName ([getLayoutName()](../../com.groupdocs.viewer.options/cadoptions\#getLayoutName--)/[setLayoutName(String)](../../com.groupdocs.viewer.options/cadoptions\#setLayoutName-String-)) options are ignored when rendering by tiles. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.util.List | The list of drawing regions to render. | + +### isRenderLayouts() {#isRenderLayouts--} +``` +public final boolean isRenderLayouts() +``` + + +Indicates whether layouts from the CAD document should be rendered. + +**Note:** This option applies only to CAD drawings that support layouts, such as [FileType.DXF](../../com.groupdocs.viewer/filetype\#DXF), [FileType.DWG](../../com.groupdocs.viewer/filetype\#DWG), [FileType.DWT](../../com.groupdocs.viewer/filetype\#DWT), [FileType.DWF](../../com.groupdocs.viewer/filetype\#DWF), and [FileType.DWFX](../../com.groupdocs.viewer/filetype\#DWFX). By default, only the Model is rendered. + +**Returns:** +boolean - true if layouts should be rendered, false otherwise. +### setRenderLayouts(boolean value) {#setRenderLayouts-boolean-} +``` +public final void setRenderLayouts(boolean value) +``` + + +Sets whether layouts from the CAD document should be rendered. + +**Note:** This option applies only to CAD drawings that support layouts, such as [FileType.DXF](../../com.groupdocs.viewer/filetype\#DXF), [FileType.DWG](../../com.groupdocs.viewer/filetype\#DWG), [FileType.DWT](../../com.groupdocs.viewer/filetype\#DWT), [FileType.DWF](../../com.groupdocs.viewer/filetype\#DWF), and [FileType.DWFX](../../com.groupdocs.viewer/filetype\#DWFX). By default, only the Model is rendered. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to render layouts, false otherwise. | + +### getLayoutName() {#getLayoutName--} +``` +public final String getLayoutName() +``` + + +Gets the name of the specific layout to render. The layout name is case-sensitive. + +**Note:** This option applies only to CAD drawings that support layouts, such as [FileType.DXF](../../com.groupdocs.viewer/filetype\#DXF), [FileType.DWG](../../com.groupdocs.viewer/filetype\#DWG), [FileType.DWT](../../com.groupdocs.viewer/filetype\#DWT), [FileType.DWF](../../com.groupdocs.viewer/filetype\#DWF), and [FileType.DWFX](../../com.groupdocs.viewer/filetype\#DWFX). By default, only the Model is rendered. + +**Returns:** +java.lang.String - the name of the specific layout to render. +### setLayoutName(String value) {#setLayoutName-java.lang.String-} +``` +public final void setLayoutName(String value) +``` + + +Sets the name of the specific layout to render. The layout name is case-sensitive. + +**Note:** This option applies only to CAD drawings that support layouts, such as [FileType.DXF](../../com.groupdocs.viewer/filetype\#DXF), [FileType.DWG](../../com.groupdocs.viewer/filetype\#DWG), [FileType.DWT](../../com.groupdocs.viewer/filetype\#DWT), [FileType.DWF](../../com.groupdocs.viewer/filetype\#DWF), and [FileType.DWFX](../../com.groupdocs.viewer/filetype\#DWFX). By default, only the Model is rendered. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The name of the specific layout to render. | + +### getLayers() {#getLayers--} +``` +public final List getLayers() +``` + + +Gets the CAD drawing layers to render. + +**Note:** By default, all layers are rendered. Layer names are case-sensitive. + +**Returns:** +java.util.List - the CAD drawing layers. +### setLayers(List value) {#setLayers-java.util.List-com.groupdocs.viewer.results.Layer--} +``` +public final void setLayers(List value) +``` + + +Gets the CAD drawing layers to render. + +**Note:** By default, all layers are rendered. Layer names are case-sensitive. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.util.List | The CAD drawing layers. | + +### equals(Object o) {#equals-java.lang.Object-} +``` +public boolean equals(Object o) +``` + + +Checks if this CadOptions object is equal to another object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| o | java.lang.Object | The object to compare with. | + +**Returns:** +boolean - true if the objects are equal, false otherwise. +### hashCode() {#hashCode--} +``` +public int hashCode() +``` + + +Computes the hash code value for this object. The hash code is based on the internal state of the object and is used in hash-based data structures such as hash maps and hash sets. + +**Note:** This method overrides the default implementation of the hashCode() method defined in the Object class. + +**Returns:** +int - the hash code value for this object. +### toString() {#toString--} +``` +public String toString() +``` + + +Returns a string representation of this object. + +**Note:** This method overrides the default implementation of the toString() method defined in the Object class. + +**Returns:** +java.lang.String - a string representation of this object. +### toString(ToStringStyle style) {#toString-org.apache.commons.lang3.builder.ToStringStyle-} +``` +public String toString(ToStringStyle style) +``` + + +Returns a string representation of this object. + +**Note:** This method overrides the default implementation of the toString() method defined in the Object class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| style | org.apache.commons.lang3.builder.ToStringStyle | The ToStringStyle to use for generating the string representation. | + +**Returns:** +java.lang.String - a string representation of this object using the specified ToStringStyle. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/emailoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/emailoptions/_index.md new file mode 100644 index 00000000..3e9a9cb4 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/emailoptions/_index.md @@ -0,0 +1,247 @@ +--- +title: EmailOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering email messages. +type: docs +weight: 14 +url: /nodejs-java/com.groupdocs.viewer.options/emailoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class EmailOptions +``` + +Provides options for rendering email messages. + +The EmailOptions class encapsulates various settings and parameters that can be used to control the rendering of email messages in the GroupDocs.Viewer component. + +Example usage: + +``` + + EmailOptions options = new EmailOptions(); + options.setDateTimeFormat("MM d yyyy HH:mm tt"); + options.setPageSize(PageSize.A4); + + PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setEmailOptions(options); + + try (Viewer viewer = new Viewer("email.msg")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [EmailOptions()](#EmailOptions--) | Initializes a new instance of the EmailOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [getDateTimeFormat()](#getDateTimeFormat--) | Gets the time format for the date and time values. | +| [setDateTimeFormat(String dateTimeFormat)](#setDateTimeFormat-java.lang.String-) | Gets the time format for the date and time values. | +| [getTimeZoneOffset()](#getTimeZoneOffset--) | Gets the time zone offset for the message. | +| [getTimeZoneOffsetMinutes()](#getTimeZoneOffsetMinutes--) | Gets the time zone minutes offset minutes for the message. | +| [setTimeZoneOffset(TimeZone timeZoneOffset)](#setTimeZoneOffset-java.util.TimeZone-) | Gets the time zone offset for the message. | +| [setTimeZoneOffset(int offsetMinutes)](#setTimeZoneOffset-int-) | Gets the time zone offset minutes offset for the message. | +| [getPageSize()](#getPageSize--) | Gets the size of the output page. | +| [setPageSize(PageSize value)](#setPageSize-com.groupdocs.viewer.options.PageSize-) | Gets the size of the output page. | +| [getFieldTextMap()](#getFieldTextMap--) | Retrieves the mapping between email message fields and their text representations. | +| [setFieldTextMap(Map value)](#setFieldTextMap-java.util.Map-com.groupdocs.viewer.options.Field-java.lang.String--) | Sets the mapping between email message fields and their text representations. | +| [equals(Object o)](#equals-java.lang.Object-) | Overrides the equals() method of the Object class. | +| [hashCode()](#hashCode--) | \{@inheritDoc\} | +| [toString()](#toString--) | Overrides the toString() method of the Object class. | +| [toString(ToStringStyle style)](#toString-org.apache.commons.lang3.builder.ToStringStyle-) | \{@inheritDoc\} | +### EmailOptions() {#EmailOptions--} +``` +public EmailOptions() +``` + + +Initializes a new instance of the EmailOptions class. This constructor is used to create a new instance of the EmailOptions class with default settings. + +### getDateTimeFormat() {#getDateTimeFormat--} +``` +public String getDateTimeFormat() +``` + + +Gets the time format for the date and time values. + +**Note:** The time format is specified using a pattern, such as 'MM d yyyy HH:mm tt'. If the time format is not set, the current system format will be used. + +**Returns:** +java.lang.String - the time format for date and time values. +### setDateTimeFormat(String dateTimeFormat) {#setDateTimeFormat-java.lang.String-} +``` +public void setDateTimeFormat(String dateTimeFormat) +``` + + +Gets the time format for the date and time values. + +**Note:** The time format is specified using a pattern, such as 'MM d yyyy HH:mm tt'. If the time format is not set, the current system format will be used. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| dateTimeFormat | java.lang.String | The time format for date and time values. | + +### getTimeZoneOffset() {#getTimeZoneOffset--} +``` +public TimeZone getTimeZoneOffset() +``` + + +Gets the time zone offset for the message. + +**Note:** The time zone offset represents the time difference between the message's time and Coordinated Universal Time (UTC). + +**Returns:** +java.util.TimeZone - the time zone offset. +### getTimeZoneOffsetMinutes() {#getTimeZoneOffsetMinutes--} +``` +public int getTimeZoneOffsetMinutes() +``` + + +Gets the time zone minutes offset minutes for the message. + +**Note:** The time zone offset minutes represents the minutes difference between the message's time and Coordinated Universal Time (UTC). + +**Returns:** +int - the time zone offset. +### setTimeZoneOffset(TimeZone timeZoneOffset) {#setTimeZoneOffset-java.util.TimeZone-} +``` +public void setTimeZoneOffset(TimeZone timeZoneOffset) +``` + + +Gets the time zone offset for the message. + +**Note:** The time zone offset represents the time difference between the message's time and Coordinated Universal Time (UTC). + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| timeZoneOffset | java.util.TimeZone | The time zone offset. | + +### setTimeZoneOffset(int offsetMinutes) {#setTimeZoneOffset-int-} +``` +public void setTimeZoneOffset(int offsetMinutes) +``` + + +Gets the time zone offset minutes offset for the message. + +**Note:** The time zone minutes offset represents the time difference between the message's time and Coordinated Universal Time (UTC). + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| offsetMinutes | int | The time zone offset. | + +### getPageSize() {#getPageSize--} +``` +public final PageSize getPageSize() +``` + + +Gets the size of the output page. + +**Returns:** +[PageSize](../../com.groupdocs.viewer.options/pagesize) - the page size. +### setPageSize(PageSize value) {#setPageSize-com.groupdocs.viewer.options.PageSize-} +``` +public final void setPageSize(PageSize value) +``` + + +Gets the size of the output page. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [PageSize](../../com.groupdocs.viewer.options/pagesize) | The page size. | + +### getFieldTextMap() {#getFieldTextMap--} +``` +public final Map getFieldTextMap() +``` + + +Retrieves the mapping between email message fields and their text representations. + +**Returns:** +java.util.Map - the mapping between email message fields and their text representations. +### setFieldTextMap(Map value) {#setFieldTextMap-java.util.Map-com.groupdocs.viewer.options.Field-java.lang.String--} +``` +public final void setFieldTextMap(Map value) +``` + + +Sets the mapping between email message fields and their text representations. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.util.Map | The mapping between email message fields and their text representations. | + +### equals(Object o) {#equals-java.lang.Object-} +``` +public boolean equals(Object o) +``` + + +Overrides the equals() method of the Object class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| o | java.lang.Object | The object to compare with. | + +**Returns:** +boolean - true if the objects are equal, false otherwise. +### hashCode() {#hashCode--} +``` +public int hashCode() +``` + + +Computes the hash code value for this object. The hash code is based on the internal state of the object and is used in hash-based data structures such as hash maps and hash sets. + +**Note:** This method overrides the default implementation of the hashCode() method defined in the Object class. + +**Returns:** +int - the hash code value for this object. +### toString() {#toString--} +``` +public String toString() +``` + + +Overrides the toString() method of the Object class. + +**Returns:** +java.lang.String - a string representation of the object. +### toString(ToStringStyle style) {#toString-org.apache.commons.lang3.builder.ToStringStyle-} +``` +public String toString(ToStringStyle style) +``` + + +Returns a string representation of this object. + +**Note:** This method overrides the default implementation of the toString() method defined in the Object class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| style | org.apache.commons.lang3.builder.ToStringStyle | The ToStringStyle to use for generating the string representation. | + +**Returns:** +java.lang.String - a string representation of this object using the specified ToStringStyle. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/field/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/field/_index.md new file mode 100644 index 00000000..a4baaea3 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/field/_index.md @@ -0,0 +1,523 @@ +--- +title: Field +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents email message fields e46g46 From To Subject etc. +type: docs +weight: 36 +url: /nodejs-java/com.groupdocs.viewer.options/field/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum Field extends Enum +``` + +Represents email message fields e.g. From, To, Subject etc. + +The Field enum represents common email message fields in the GroupDocs.Viewer component. It provides a set of predefined fields that can be used to identify and access specific information in email messages, such as the sender, recipient, subject, and more. + +Example usage: + +``` + + HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources(); + EmailOptions emailOptions = htmlViewOptions.getEmailOptions(); + emailOptions.getFieldTextMap().put(Field.FROM, "Sender"); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [ANNIVERSARY](#ANNIVERSARY) | Represents the "Anniversary" field. | +| [ATTACHMENTS](#ATTACHMENTS) | Represents the "Attachments" field. | +| [BCC](#BCC) | Represents the "Bcc" field. | +| [BIRTHDAY](#BIRTHDAY) | Represents the "Birthday" field. | +| [BUSINESS](#BUSINESS) | Represents the "Business" field. | +| [BUSINESS_ADDRESS](#BUSINESS-ADDRESS) | Represents the "Business Address" field. | +| [BUSINESS_FAX](#BUSINESS-FAX) | Represents the "Business Fax" field. | +| [BUSINESS_HOMEPAGE](#BUSINESS-HOMEPAGE) | Represents the "BusinessHomepage" field. | +| [CC](#CC) | Represents the "Cc" field. | +| [COMPANY](#COMPANY) | Represents the "Company" field. | +| [DEPARTMENT](#DEPARTMENT) | Represents the "Department" field. | +| [EMAIL](#EMAIL) | Represents the "Email" field. | +| [EMAIL_DISPLAY_AS](#EMAIL-DISPLAY-AS) | Represents the "Email Display As" field. | +| [EMAIL_2](#EMAIL-2) | Represents the "Email2" field. | +| [EMAIL_2_DISPLAY_AS](#EMAIL-2-DISPLAY-AS) | Represents the "Email2 Display As" field. | +| [EMAIL_3](#EMAIL-3) | Represents the "Email3" field. | +| [EMAIL_3_DISPLAY_AS](#EMAIL-3-DISPLAY-AS) | Represents the "Email3 Display As" field. | +| [END](#END) | Represents the "End" field. | +| [FIRST_NAME](#FIRST-NAME) | Represents the "First Name" field. | +| [FROM](#FROM) | Represents the "From" field. | +| [FULL_NAME](#FULL-NAME) | Represents the "Full Name" field. | +| [GENDER](#GENDER) | Represents the "Gender" field. | +| [HOBBIES](#HOBBIES) | Represents the "Hobbies" field. | +| [HOME](#HOME) | Represents the "Home" field. | +| [HOME_ADDRESS](#HOME-ADDRESS) | Represents the "Home Address" field. | +| [IMPORTANCE](#IMPORTANCE) | Represents the "Importance" field. | +| [JOB_TITLE](#JOB-TITLE) | Represents the "Job Title" field. | +| [LAST_NAME](#LAST-NAME) | Represents the "Last Name" field. | +| [LOCATION](#LOCATION) | Represents the "Location" field. | +| [MIDDLE_NAME](#MIDDLE-NAME) | Represents the "Middle Name" field. | +| [MOBILE](#MOBILE) | Represents the "Mobile" field. | +| [ORGANIZER](#ORGANIZER) | Represents the "Organizer" field. | +| [OTHER_ADDRESS](#OTHER-ADDRESS) | Represents the "Other Address" field. | +| [PERSONAL_HOMEPAGE](#PERSONAL-HOMEPAGE) | Represents the "Personal Homepage" field. | +| [PROFESSION](#PROFESSION) | Represents the "Profession" field. | +| [RECURRENCE](#RECURRENCE) | Represents the "Recurrence" field. | +| [RECURRENCE_PATTERN](#RECURRENCE-PATTERN) | Represents the "Recurrence Pattern" field. | +| [REQUIRED_ATTENDEES](#REQUIRED-ATTENDEES) | Represents the "Required Attendees" field. | +| [SENT](#SENT) | Represents the "Sent" field. | +| [SHOW_TIME_AS](#SHOW-TIME-AS) | Represents the "Show Time As" field. | +| [SPOUSE_PARTNER](#SPOUSE-PARTNER) | Represents the "Spouse/Partner" field. | +| [START](#START) | Represents the "Start" field. | +| [SUBJECT](#SUBJECT) | Represents the "Subject" field. | +| [TO](#TO) | Represents the "To" field. | +| [USER_FIELD_1](#USER-FIELD-1) | Represents the "User Field 1" field. | +| [USER_FIELD_2](#USER-FIELD-2) | Represents the "User Field 2" field. | +| [USER_FIELD_3](#USER-FIELD-3) | Represents the "User Field 3" field. | +| [USER_FIELD_4](#USER-FIELD-4) | Represents the "User Field 4" field. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +| [getName()](#getName--) | Field name. | +| [toString()](#toString--) | Returns a string that represents the current object. | +### ANNIVERSARY {#ANNIVERSARY} +``` +public static final Field ANNIVERSARY +``` + + +Represents the "Anniversary" field. + +### ATTACHMENTS {#ATTACHMENTS} +``` +public static final Field ATTACHMENTS +``` + + +Represents the "Attachments" field. + +### BCC {#BCC} +``` +public static final Field BCC +``` + + +Represents the "Bcc" field. + +### BIRTHDAY {#BIRTHDAY} +``` +public static final Field BIRTHDAY +``` + + +Represents the "Birthday" field. + +### BUSINESS {#BUSINESS} +``` +public static final Field BUSINESS +``` + + +Represents the "Business" field. + +### BUSINESS_ADDRESS {#BUSINESS-ADDRESS} +``` +public static final Field BUSINESS_ADDRESS +``` + + +Represents the "Business Address" field. + +### BUSINESS_FAX {#BUSINESS-FAX} +``` +public static final Field BUSINESS_FAX +``` + + +Represents the "Business Fax" field. + +### BUSINESS_HOMEPAGE {#BUSINESS-HOMEPAGE} +``` +public static final Field BUSINESS_HOMEPAGE +``` + + +Represents the "BusinessHomepage" field. + +### CC {#CC} +``` +public static final Field CC +``` + + +Represents the "Cc" field. + +### COMPANY {#COMPANY} +``` +public static final Field COMPANY +``` + + +Represents the "Company" field. + +### DEPARTMENT {#DEPARTMENT} +``` +public static final Field DEPARTMENT +``` + + +Represents the "Department" field. + +### EMAIL {#EMAIL} +``` +public static final Field EMAIL +``` + + +Represents the "Email" field. + +### EMAIL_DISPLAY_AS {#EMAIL-DISPLAY-AS} +``` +public static final Field EMAIL_DISPLAY_AS +``` + + +Represents the "Email Display As" field. + +### EMAIL_2 {#EMAIL-2} +``` +public static final Field EMAIL_2 +``` + + +Represents the "Email2" field. + +### EMAIL_2_DISPLAY_AS {#EMAIL-2-DISPLAY-AS} +``` +public static final Field EMAIL_2_DISPLAY_AS +``` + + +Represents the "Email2 Display As" field. + +### EMAIL_3 {#EMAIL-3} +``` +public static final Field EMAIL_3 +``` + + +Represents the "Email3" field. + +### EMAIL_3_DISPLAY_AS {#EMAIL-3-DISPLAY-AS} +``` +public static final Field EMAIL_3_DISPLAY_AS +``` + + +Represents the "Email3 Display As" field. + +### END {#END} +``` +public static final Field END +``` + + +Represents the "End" field. + +### FIRST_NAME {#FIRST-NAME} +``` +public static final Field FIRST_NAME +``` + + +Represents the "First Name" field. + +### FROM {#FROM} +``` +public static final Field FROM +``` + + +Represents the "From" field. + +### FULL_NAME {#FULL-NAME} +``` +public static final Field FULL_NAME +``` + + +Represents the "Full Name" field. + +### GENDER {#GENDER} +``` +public static final Field GENDER +``` + + +Represents the "Gender" field. + +### HOBBIES {#HOBBIES} +``` +public static final Field HOBBIES +``` + + +Represents the "Hobbies" field. + +### HOME {#HOME} +``` +public static final Field HOME +``` + + +Represents the "Home" field. + +### HOME_ADDRESS {#HOME-ADDRESS} +``` +public static final Field HOME_ADDRESS +``` + + +Represents the "Home Address" field. + +### IMPORTANCE {#IMPORTANCE} +``` +public static final Field IMPORTANCE +``` + + +Represents the "Importance" field. + +### JOB_TITLE {#JOB-TITLE} +``` +public static final Field JOB_TITLE +``` + + +Represents the "Job Title" field. + +### LAST_NAME {#LAST-NAME} +``` +public static final Field LAST_NAME +``` + + +Represents the "Last Name" field. + +### LOCATION {#LOCATION} +``` +public static final Field LOCATION +``` + + +Represents the "Location" field. + +### MIDDLE_NAME {#MIDDLE-NAME} +``` +public static final Field MIDDLE_NAME +``` + + +Represents the "Middle Name" field. + +### MOBILE {#MOBILE} +``` +public static final Field MOBILE +``` + + +Represents the "Mobile" field. + +### ORGANIZER {#ORGANIZER} +``` +public static final Field ORGANIZER +``` + + +Represents the "Organizer" field. + +### OTHER_ADDRESS {#OTHER-ADDRESS} +``` +public static final Field OTHER_ADDRESS +``` + + +Represents the "Other Address" field. + +### PERSONAL_HOMEPAGE {#PERSONAL-HOMEPAGE} +``` +public static final Field PERSONAL_HOMEPAGE +``` + + +Represents the "Personal Homepage" field. + +### PROFESSION {#PROFESSION} +``` +public static final Field PROFESSION +``` + + +Represents the "Profession" field. + +### RECURRENCE {#RECURRENCE} +``` +public static final Field RECURRENCE +``` + + +Represents the "Recurrence" field. + +### RECURRENCE_PATTERN {#RECURRENCE-PATTERN} +``` +public static final Field RECURRENCE_PATTERN +``` + + +Represents the "Recurrence Pattern" field. + +### REQUIRED_ATTENDEES {#REQUIRED-ATTENDEES} +``` +public static final Field REQUIRED_ATTENDEES +``` + + +Represents the "Required Attendees" field. + +### SENT {#SENT} +``` +public static final Field SENT +``` + + +Represents the "Sent" field. + +### SHOW_TIME_AS {#SHOW-TIME-AS} +``` +public static final Field SHOW_TIME_AS +``` + + +Represents the "Show Time As" field. + +### SPOUSE_PARTNER {#SPOUSE-PARTNER} +``` +public static final Field SPOUSE_PARTNER +``` + + +Represents the "Spouse/Partner" field. + +### START {#START} +``` +public static final Field START +``` + + +Represents the "Start" field. + +### SUBJECT {#SUBJECT} +``` +public static final Field SUBJECT +``` + + +Represents the "Subject" field. + +### TO {#TO} +``` +public static final Field TO +``` + + +Represents the "To" field. + +### USER_FIELD_1 {#USER-FIELD-1} +``` +public static final Field USER_FIELD_1 +``` + + +Represents the "User Field 1" field. + +### USER_FIELD_2 {#USER-FIELD-2} +``` +public static final Field USER_FIELD_2 +``` + + +Represents the "User Field 2" field. + +### USER_FIELD_3 {#USER-FIELD-3} +``` +public static final Field USER_FIELD_3 +``` + + +Represents the "User Field 3" field. + +### USER_FIELD_4 {#USER-FIELD-4} +``` +public static final Field USER_FIELD_4 +``` + + +Represents the "User Field 4" field. + +### values() {#values--} +``` +public static Field[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.options.Field[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static Field valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[Field](../../com.groupdocs.viewer.options/field) +### getName() {#getName--} +``` +public final String getName() +``` + + +Field name. + +This method retrieves the name of the field. + +**Returns:** +java.lang.String - the name of the field. +### toString() {#toString--} +``` +public String toString() +``` + + +Returns a string that represents the current object. + +**Returns:** +java.lang.String - a string that represents the current object. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/filename/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/filename/_index.md new file mode 100644 index 00000000..a7162723 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/filename/_index.md @@ -0,0 +1,100 @@ +--- +title: FileName +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents the name of a file in an archive. +type: docs +weight: 15 +url: /nodejs-java/com.groupdocs.viewer.options/filename/ +--- +**Inheritance:** +java.lang.Object +``` +public class FileName +``` + +Represents the name of a file in an archive. + +The FileName class encapsulates the name of a file without any path or directory information. It provides methods to manipulate and retrieve information about the file name. + +Example usage: + +``` + + HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources(); + options.getArchiveOptions().setFileName(new FileName("my-file-name")); + + final LoadOptions loadOptions = new LoadOptions(FileType.ZIP); + try (final Viewer viewer = new Viewer(documentPath, loadOptions)) { + viewer.view(options); + // Use the viewer object for archive document rendering + } + +``` + +***Note:** The FileName class is used to work with file names and does not handle file operations or manipulation.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [FileName(String fileName)](#FileName-java.lang.String-) | Initializes a new instance of the FileName class. | +## Fields + +| Field | Description | +| --- | --- | +| [EMPTY](#EMPTY) | Represents an empty filename. | +| [SOURCE](#SOURCE) | Represents the name of the source file. | +## Methods + +| Method | Description | +| --- | --- | +| [getText()](#getText--) | | +| [toString()](#toString--) | Returns a string representation of the current object. | +### FileName(String fileName) {#FileName-java.lang.String-} +``` +public FileName(String fileName) +``` + + +Initializes a new instance of the FileName class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileName | java.lang.String | The name of the file. | + +### EMPTY {#EMPTY} +``` +public static final FileName EMPTY +``` + + +Represents an empty filename. + +### SOURCE {#SOURCE} +``` +public static final FileName SOURCE +``` + + +Represents the name of the source file. + +### getText() {#getText--} +``` +public String getText() +``` + + + + +**Returns:** +java.lang.String +### toString() {#toString--} +``` +public String toString() +``` + + +Returns a string representation of the current object. + +**Returns:** +java.lang.String - a string representation of the current object. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/htmlviewoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/htmlviewoptions/_index.md new file mode 100644 index 00000000..78676572 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/htmlviewoptions/_index.md @@ -0,0 +1,583 @@ +--- +title: HtmlViewOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering documents into HTML format. +type: docs +weight: 16 +url: /nodejs-java/com.groupdocs.viewer.options/htmlviewoptions/ +--- +**Inheritance:** +java.lang.Object, [com.groupdocs.viewer.options.BaseViewOptions](../../com.groupdocs.viewer.options/baseviewoptions), [com.groupdocs.viewer.options.ViewOptions](../../com.groupdocs.viewer.options/viewoptions) +``` +public class HtmlViewOptions extends ViewOptions +``` + +Provides options for rendering documents into HTML format. + +The HtmlViewOptions class encapsulates additional settings and parameters that can be used to control the rendering of documents into HTML format in the GroupDocs.Viewer component. + +Example usage: + +``` + + HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources(); + options.setExcludeFonts(true); + options.setFontsToExclude(Arrays.asList("font-name")); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(options); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [CREATE_PAGE_STREAM](#CREATE-PAGE-STREAM) | | +| [FILE_PATH_FORMAT](#FILE-PATH-FORMAT) | | +## Methods + +| Method | Description | +| --- | --- | +| [getImageMaxWidth()](#getImageMaxWidth--) | Returns the maximum width of an output image in pixels. | +| [setImageMaxWidth(int imageMaxWidth)](#setImageMaxWidth-int-) | Sets the maximum width of an output image in pixels. | +| [getImageMaxHeight()](#getImageMaxHeight--) | Gets the maximum height of an output image in pixels. | +| [setImageMaxHeight(int imageMaxHeight)](#setImageMaxHeight-int-) | Sets the maximum height of an output image in pixels. | +| [getImageWidth()](#getImageWidth--) | Gets the width of the output image in pixels. | +| [setImageWidth(int imageWidth)](#setImageWidth-int-) | Sets the width of the output image in pixels. | +| [getImageHeight()](#getImageHeight--) | Gets the height of the output image in pixels when converting a single image to HTML. | +| [setImageHeight(int imageHeight)](#setImageHeight-int-) | Sets the height of the output image in pixels when converting a single image to HTML. | +| [forEmbeddedResources(CreatePageStream createPageStream)](#forEmbeddedResources-com.groupdocs.viewer.interfaces.CreatePageStream-) | Initializes a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. | +| [forEmbeddedResources(CreatePageStream createPageStream, ReleasePageStream releasePageStream)](#forEmbeddedResources-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.ReleasePageStream-) | Initializes a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. | +| [forEmbeddedResources(PageStreamFactory pageStreamFactory)](#forEmbeddedResources-com.groupdocs.viewer.interfaces.PageStreamFactory-) | Initializes a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. | +| [forEmbeddedResources()](#forEmbeddedResources--) | Initializes a new instance of the HtmlViewOptions class. | +| [forEmbeddedResources(String filePathFormat)](#forEmbeddedResources-java.lang.String-) | Initializes a new instance of the HtmlViewOptions class. | +| [forEmbeddedResources(Path filePathFormat)](#forEmbeddedResources-java.nio.file.Path-) | Initializes a new instance of the HtmlViewOptions class. | +| [forExternalResources(CreatePageStream createPageStream, CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl)](#forExternalResources-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.CreateResourceStream-com.groupdocs.viewer.interfaces.CreateResourceUrl-) | Initializes a new instance of the HtmlViewOptions class for rendering into HTML with external resources. | +| [forExternalResources(CreatePageStream createPageStream, CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl, ReleasePageStream releasePageStream, ReleaseResourceStream releaseResourceStream)](#forExternalResources-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.CreateResourceStream-com.groupdocs.viewer.interfaces.CreateResourceUrl-com.groupdocs.viewer.interfaces.ReleasePageStream-com.groupdocs.viewer.interfaces.ReleaseResourceStream-) | Initializes a new instance of the HtmlViewOptions class for rendering into HTML with external resources. | +| [forExternalResources(PageStreamFactory pageStreamFactory, ResourceStreamFactory resourceStreamFactory)](#forExternalResources-com.groupdocs.viewer.interfaces.PageStreamFactory-com.groupdocs.viewer.interfaces.ResourceStreamFactory-) | Initializes a new instance of the HtmlViewOptions class for rendering into HTML with external resources. | +| [forExternalResources()](#forExternalResources--) | Initializes new instance of HtmlViewOptions class. | +| [forExternalResources(String filePathFormat, String resourceFilePathFormat, String resourceUrlFormat)](#forExternalResources-java.lang.String-java.lang.String-java.lang.String-) | Initializes a new instance of the HtmlViewOptions class. | +| [isRenderResponsive()](#isRenderResponsive--) | Determines whether responsive rendering is enabled. | +| [setRenderResponsive(boolean value)](#setRenderResponsive-boolean-) | Sets whether responsive rendering is enabled. | +| [isMinify()](#isMinify--) | Checks if HTML content and HTML resources minification is enabled. | +| [setMinify(boolean value)](#setMinify-boolean-) | Sets whether HTML content and HTML resources minification is enabled. | +| [setRenderToSinglePage(boolean renderSinglePage)](#setRenderToSinglePage-boolean-) | Enables rendering an entire document to one HTML file. | +| [isRenderToSinglePage()](#isRenderToSinglePage--) | Enables rendering an entire document to one HTML file. | +| [isExcludeFonts()](#isExcludeFonts--) | Determines whether to exclude fonts from the HTML document. | +| [setExcludeFonts(boolean value)](#setExcludeFonts-boolean-) | Sets whether to exclude fonts from the HTML document. | +| [getFontsToExclude()](#getFontsToExclude--) | Retrieves the list of font names to exclude from the HTML document. | +| [setFontsToExclude(List value)](#setFontsToExclude-java.util.List-java.lang.String--) | Sets the list of font names to exclude from the HTML document. | +| [isForPrinting()](#isForPrinting--) | Checks if the output HTML should be optimized for printing. | +| [setForPrinting(boolean value)](#setForPrinting-boolean-) | Sets whether the output HTML should be optimized for printing. | +| [getDocumentSavingCallback()](#getDocumentSavingCallback--) | Retrieves the callback used to estimate the saving progress of a Words or Email document. | +| [setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback)](#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-) | Sets the callback used to estimate the saving progress of a Words or Email document. | +### CREATE_PAGE_STREAM {#CREATE-PAGE-STREAM} +``` +public static final String CREATE_PAGE_STREAM +``` + + +### FILE_PATH_FORMAT {#FILE-PATH-FORMAT} +``` +public static final String FILE_PATH_FORMAT +``` + + +### getImageMaxWidth() {#getImageMaxWidth--} +``` +public int getImageMaxWidth() +``` + + +Returns the maximum width of an output image in pixels. + +**Note:** This value is used when converting a single image to HTML. + +**Returns:** +int - the maximum width of an output image. +### setImageMaxWidth(int imageMaxWidth) {#setImageMaxWidth-int-} +``` +public void setImageMaxWidth(int imageMaxWidth) +``` + + +Sets the maximum width of an output image in pixels. + +**Note:** This value is used when converting a single image to HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageMaxWidth | int | The maximum width of an output image. | + +### getImageMaxHeight() {#getImageMaxHeight--} +``` +public int getImageMaxHeight() +``` + + +Gets the maximum height of an output image in pixels. + +**Note:** This option applies when converting a single image to HTML. It specifies the maximum height of the output image. + +**Returns:** +int - the maximum height of an output image. +### setImageMaxHeight(int imageMaxHeight) {#setImageMaxHeight-int-} +``` +public void setImageMaxHeight(int imageMaxHeight) +``` + + +Sets the maximum height of an output image in pixels. + +**Note:** This option applies when converting a single image to HTML. It specifies the maximum height of the output image. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageMaxHeight | int | The maximum height of an output image. | + +### getImageWidth() {#getImageWidth--} +``` +public int getImageWidth() +``` + + +Gets the width of the output image in pixels. + +***Note:** This value is applicable only when converting a single image to HTML.* + +**Returns:** +int - the width of the output image. +### setImageWidth(int imageWidth) {#setImageWidth-int-} +``` +public void setImageWidth(int imageWidth) +``` + + +Sets the width of the output image in pixels. + +***Note:** This value is applicable only when converting a single image to HTML.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageWidth | int | The width of the output image. | + +### getImageHeight() {#getImageHeight--} +``` +public int getImageHeight() +``` + + +Gets the height of the output image in pixels when converting a single image to HTML. + +**Returns:** +int - the height of the output image in pixels. +### setImageHeight(int imageHeight) {#setImageHeight-int-} +``` +public void setImageHeight(int imageHeight) +``` + + +Sets the height of the output image in pixels when converting a single image to HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageHeight | int | The height of the output image in pixels. | + +### forEmbeddedResources(CreatePageStream createPageStream) {#forEmbeddedResources-com.groupdocs.viewer.interfaces.CreatePageStream-} +``` +public static HtmlViewOptions forEmbeddedResources(CreatePageStream createPageStream) +``` + + +Initializes a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. + +***Note:** The method takes a CreatePageStream parameter, which is a method used to instantiate a stream for writing output page data.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates a stream used to write output page data. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. +### forEmbeddedResources(CreatePageStream createPageStream, ReleasePageStream releasePageStream) {#forEmbeddedResources-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.ReleasePageStream-} +``` +public static HtmlViewOptions forEmbeddedResources(CreatePageStream createPageStream, ReleasePageStream releasePageStream) +``` + + +Initializes a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates a stream used to write output page data. | +| releasePageStream | [ReleasePageStream](../../com.groupdocs.viewer.interfaces/releasepagestream) | The method that releases the stream created by the method assigned to the createPageStream parameter. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. +### forEmbeddedResources(PageStreamFactory pageStreamFactory) {#forEmbeddedResources-com.groupdocs.viewer.interfaces.PageStreamFactory-} +``` +public static HtmlViewOptions forEmbeddedResources(PageStreamFactory pageStreamFactory) +``` + + +Initializes a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageStreamFactory | [PageStreamFactory](../../com.groupdocs.viewer.interfaces/pagestreamfactory) | The factory that implements methods for creating and releasing the output page stream. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class for rendering into HTML with embedded resources. +### forEmbeddedResources() {#forEmbeddedResources--} +``` +public static HtmlViewOptions forEmbeddedResources() +``` + + +Initializes a new instance of the HtmlViewOptions class. + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class. +### forEmbeddedResources(String filePathFormat) {#forEmbeddedResources-java.lang.String-} +``` +public static HtmlViewOptions forEmbeddedResources(String filePathFormat) +``` + + +Initializes a new instance of the HtmlViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePathFormat | java.lang.String | The file path format, e.g., 'page\_\{0\}.html'. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class. +### forEmbeddedResources(Path filePathFormat) {#forEmbeddedResources-java.nio.file.Path-} +``` +public static HtmlViewOptions forEmbeddedResources(Path filePathFormat) +``` + + +Initializes a new instance of the HtmlViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePathFormat | java.nio.file.Path | The file path format, e.g., 'page\_\{0\}.html'. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class. +### forExternalResources(CreatePageStream createPageStream, CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl) {#forExternalResources-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.CreateResourceStream-com.groupdocs.viewer.interfaces.CreateResourceUrl-} +``` +public static HtmlViewOptions forExternalResources(CreatePageStream createPageStream, CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl) +``` + + +Initializes a new instance of the HtmlViewOptions class for rendering into HTML with external resources. + +***Note:** This method should be used when rendering HTML with external resources, such as CSS and JavaScript files.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates the stream used to write output page data. | +| createResourceStream | [CreateResourceStream](../../com.groupdocs.viewer.interfaces/createresourcestream) | The method that releases the stream created by the createPageStream method. | +| createResourceUrl | [CreateResourceUrl](../../com.groupdocs.viewer.interfaces/createresourceurl) | The method that creates the URL for the HTML resource. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class for rendering into HTML with external resources. +### forExternalResources(CreatePageStream createPageStream, CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl, ReleasePageStream releasePageStream, ReleaseResourceStream releaseResourceStream) {#forExternalResources-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.CreateResourceStream-com.groupdocs.viewer.interfaces.CreateResourceUrl-com.groupdocs.viewer.interfaces.ReleasePageStream-com.groupdocs.viewer.interfaces.ReleaseResourceStream-} +``` +public static HtmlViewOptions forExternalResources(CreatePageStream createPageStream, CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl, ReleasePageStream releasePageStream, ReleaseResourceStream releaseResourceStream) +``` + + +Initializes a new instance of the HtmlViewOptions class for rendering into HTML with external resources. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates the stream used to write output page data. | +| createResourceStream | [CreateResourceStream](../../com.groupdocs.viewer.interfaces/createresourcestream) | The method that instantiates the stream used to write output HTML resource data. | +| createResourceUrl | [CreateResourceUrl](../../com.groupdocs.viewer.interfaces/createresourceurl) | The method that creates the URL for the HTML resource. | +| releasePageStream | [ReleasePageStream](../../com.groupdocs.viewer.interfaces/releasepagestream) | The method that releases the stream created by the createPageStream method. | +| releaseResourceStream | [ReleaseResourceStream](../../com.groupdocs.viewer.interfaces/releaseresourcestream) | The method that releases the stream created by the createResourceStream method. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class for rendering into HTML with external resources. +### forExternalResources(PageStreamFactory pageStreamFactory, ResourceStreamFactory resourceStreamFactory) {#forExternalResources-com.groupdocs.viewer.interfaces.PageStreamFactory-com.groupdocs.viewer.interfaces.ResourceStreamFactory-} +``` +public static HtmlViewOptions forExternalResources(PageStreamFactory pageStreamFactory, ResourceStreamFactory resourceStreamFactory) +``` + + +Initializes a new instance of the HtmlViewOptions class for rendering into HTML with external resources. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageStreamFactory | [PageStreamFactory](../../com.groupdocs.viewer.interfaces/pagestreamfactory) | The factory that implements methods for creating and releasing the output page stream. | +| resourceStreamFactory | [ResourceStreamFactory](../../com.groupdocs.viewer.interfaces/resourcestreamfactory) | The factory that implements methods for creating resource URLs and instantiating/releasing the output HTML resource stream. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) - a new instance of the HtmlViewOptions class for rendering into HTML with external resources. +### forExternalResources() {#forExternalResources--} +``` +public static HtmlViewOptions forExternalResources() +``` + + +Initializes new instance of HtmlViewOptions class. + + * \- with "p\_\{0\}.html" as file path format for the output HTML files; + * \- with "p\_\{0\}\_\{1\}" as file path format for the output HTML-resource files; + * \- with "p\_\{0\}\_\{1\}" as URL format for HTML-resources; + +The output files will be placed into current working directory of the application. + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) +### forExternalResources(String filePathFormat, String resourceFilePathFormat, String resourceUrlFormat) {#forExternalResources-java.lang.String-java.lang.String-java.lang.String-} +``` +public static HtmlViewOptions forExternalResources(String filePathFormat, String resourceFilePathFormat, String resourceUrlFormat) +``` + + +Initializes a new instance of the HtmlViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePathFormat | java.lang.String | The file path format, e.g., 'page\_\{0\}.html'. | +| resourceFilePathFormat | java.lang.String | The resource file path format, e.g., 'page\_\{0\}/resource\_\{1\}'. | +| resourceUrlFormat | java.lang.String | The resource URL format, e.g., 'page\_\{0\}/resource\_\{1\}'. | + +**Returns:** +[HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) +### isRenderResponsive() {#isRenderResponsive--} +``` +public final boolean isRenderResponsive() +``` + + +Determines whether responsive rendering is enabled. Responsive web pages render well on devices with different screen sizes. + +**Returns:** +boolean - true if responsive rendering is enabled, false otherwise. +### setRenderResponsive(boolean value) {#setRenderResponsive-boolean-} +``` +public final void setRenderResponsive(boolean value) +``` + + +Sets whether responsive rendering is enabled. Responsive web pages render well on devices with different screen sizes. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable responsive rendering, false to disable it. | + +### isMinify() {#isMinify--} +``` +public final boolean isMinify() +``` + + +Checks if HTML content and HTML resources minification is enabled. + +**Returns:** +boolean - true if minification is enabled, false otherwise. +### setMinify(boolean value) {#setMinify-boolean-} +``` +public final void setMinify(boolean value) +``` + + +Sets whether HTML content and HTML resources minification is enabled. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable minification, false to disable. | + +### setRenderToSinglePage(boolean renderSinglePage) {#setRenderToSinglePage-boolean-} +``` +public void setRenderToSinglePage(boolean renderSinglePage) +``` + + +Enables rendering an entire document to one HTML file. + +**See the following topics for more information:** + + * [Render archives as HTML, PDF, and image files][Render archives as HTML_ PDF_ and image files] + * [Render text documents as HTML, PDF, and image files][Render text documents as HTML_ PDF_ and image files] + * [Render Excel and Apple Numbers spreadsheets as HTML, PDF, and image files][Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files] + * [Render web documents as PDF, PNG, and JPEG files][Render web documents as PDF_ PNG_ and JPEG files] + +**Example:** + +``` +try (final Viewer viewer = new Viewer("invoice.docx")) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + viewOptions.setRenderToSinglePage(true); + + viewer.view(viewOptions); + } +``` + + +[Render archives as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-archive-files/#create-a-single-html-page +[Render text documents as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-text-files/#create-a-single-html-page +[Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/#convert-all-excel-worksheets-to-one-html-file +[Render web documents as PDF_ PNG_ and JPEG files]: https://docs.groupdocs.com/viewer/java/render-web-documents/#create-an-html-file-with-embedded-resources + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderSinglePage | boolean | | + +### isRenderToSinglePage() {#isRenderToSinglePage--} +``` +public boolean isRenderToSinglePage() +``` + + +Enables rendering an entire document to one HTML file. + +**See the following topics for more information:** + + * [Render archives as HTML, PDF, and image files][Render archives as HTML_ PDF_ and image files] + * [Render text documents as HTML, PDF, and image files][Render text documents as HTML_ PDF_ and image files] + * [Render Excel and Apple Numbers spreadsheets as HTML, PDF, and image files][Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files] + * [Render web documents as PDF, PNG, and JPEG files][Render web documents as PDF_ PNG_ and JPEG files] + +**Example:** + +``` +try (final Viewer viewer = new Viewer("invoice.docx")) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + viewOptions.setRenderToSinglePage(true); + + viewer.view(viewOptions); + } +``` + + +[Render archives as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-archive-files/#create-a-single-html-page +[Render text documents as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-text-files/#create-a-single-html-page +[Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/#convert-all-excel-worksheets-to-one-html-file +[Render web documents as PDF_ PNG_ and JPEG files]: https://docs.groupdocs.com/viewer/java/render-web-documents/#create-an-html-file-with-embedded-resources + +**Returns:** +boolean +### isExcludeFonts() {#isExcludeFonts--} +``` +public final boolean isExcludeFonts() +``` + + +Determines whether to exclude fonts from the HTML document. + +**Returns:** +boolean - true if fonts should be excluded, false otherwise. +### setExcludeFonts(boolean value) {#setExcludeFonts-boolean-} +``` +public final void setExcludeFonts(boolean value) +``` + + +Sets whether to exclude fonts from the HTML document. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to exclude fonts, false otherwise. | + +### getFontsToExclude() {#getFontsToExclude--} +``` +public final List getFontsToExclude() +``` + + +Retrieves the list of font names to exclude from the HTML document. + +This option is supported for presentations only. Including fonts in the HTML document improves the stability of the output view but increases the rendering result's size. Use this option to find a compromise between stability and output size. Include font names that are popular and installed on most systems. + +***Note:** Please note that this property is active only when the ExcludeFonts (\#isExcludeFonts().isExcludeFonts()/\#setExcludeFonts(boolean).setExcludeFonts(boolean)) option is disabled.* + +**Returns:** +java.util.List - the list of font names to exclude from the HTML document. +### setFontsToExclude(List value) {#setFontsToExclude-java.util.List-java.lang.String--} +``` +public final void setFontsToExclude(List value) +``` + + +Sets the list of font names to exclude from the HTML document. + +This option is supported for presentations only. Including fonts in the HTML document improves the stability of the output view but increases the rendering result's size. Use this option to find a compromise between stability and output size. Include font names that are popular and installed on most systems. + +***Note:** Please note that this property is active only when the ExcludeFonts (\#isExcludeFonts().isExcludeFonts()/\#setExcludeFonts(boolean).setExcludeFonts(boolean)) option is disabled.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.util.List | The list of font names to exclude from the HTML document. | + +### isForPrinting() {#isForPrinting--} +``` +public final boolean isForPrinting() +``` + + +Checks if the output HTML should be optimized for printing. + +**Returns:** +boolean - true if the output HTML should be optimized for printing, false otherwise. +### setForPrinting(boolean value) {#setForPrinting-boolean-} +``` +public final void setForPrinting(boolean value) +``` + + +Sets whether the output HTML should be optimized for printing. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to optimize the output HTML for printing, false otherwise. | + +### getDocumentSavingCallback() {#getDocumentSavingCallback--} +``` +public IDocumentSavingCallback getDocumentSavingCallback() +``` + + +Retrieves the callback used to estimate the saving progress of a Words or Email document. + +**Returns:** +com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback - the callback used to estimate the document saving progress. +### setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) {#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-} +``` +public void setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) +``` + + +Sets the callback used to estimate the saving progress of a Words or Email document. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| documentSavingCallback | com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback | The callback used to estimate the document saving progress. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/imagequality/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/imagequality/_index.md new file mode 100644 index 00000000..de887242 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/imagequality/_index.md @@ -0,0 +1,94 @@ +--- +title: ImageQuality +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The quality of images in the output HTML contained by the PDF documents. +type: docs +weight: 37 +url: /nodejs-java/com.groupdocs.viewer.options/imagequality/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum ImageQuality extends Enum +``` + +The quality of images in the output HTML contained by the PDF documents. + +The ImageQuality enum represents the quality of images in the output HTML contained by the PDF documents in the GroupDocs.Viewer component. It provides different levels of image quality that can be used to control the rendering and compression of images in the generated HTML output. + +Example usage: + +``` + + HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources(); + PdfOptions pdfOptions = htmlViewOptions.getPdfOptions(); + pdfOptions.setImageQuality(ImageQuality.HIGH); + + try (Viewer viewer = new Viewer("document.pdf")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [LOW](#LOW) | The acceptable quality and best performance. | +| [MEDIUM](#MEDIUM) | Better quality and slower performance. | +| [HIGH](#HIGH) | Best quality but slow performance. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +### LOW {#LOW} +``` +public static final ImageQuality LOW +``` + + +The acceptable quality and best performance. This setting prioritizes rendering speed over image quality. + +### MEDIUM {#MEDIUM} +``` +public static final ImageQuality MEDIUM +``` + + +Better quality and slower performance. This setting provides a balance between image quality and rendering speed. + +### HIGH {#HIGH} +``` +public static final ImageQuality HIGH +``` + + +Best quality but slow performance. This setting prioritizes image quality over rendering speed. + +### values() {#values--} +``` +public static ImageQuality[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.options.ImageQuality[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static ImageQuality valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[ImageQuality](../../com.groupdocs.viewer.options/imagequality) diff --git a/english/nodejs-java/com.groupdocs.viewer.options/jpgviewoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/jpgviewoptions/_index.md new file mode 100644 index 00000000..02de43e3 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/jpgviewoptions/_index.md @@ -0,0 +1,321 @@ +--- +title: JpgViewOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering documents into JPG format. +type: docs +weight: 17 +url: /nodejs-java/com.groupdocs.viewer.options/jpgviewoptions/ +--- +**Inheritance:** +java.lang.Object, [com.groupdocs.viewer.options.BaseViewOptions](../../com.groupdocs.viewer.options/baseviewoptions), [com.groupdocs.viewer.options.ViewOptions](../../com.groupdocs.viewer.options/viewoptions) + +**All Implemented Interfaces:** +[com.groupdocs.viewer.options.IMaxSizeOptions](../../com.groupdocs.viewer.options/imaxsizeoptions) +``` +public class JpgViewOptions extends ViewOptions implements IMaxSizeOptions +``` + +Provides options for rendering documents into JPG format. + +The JpgViewOptions class encapsulates additional settings and parameters that can be used to control the rendering of documents into JPG format in the GroupDocs.Viewer component. + +Example usage: + +``` + + JpgViewOptions options = new JpgViewOptions(); + options.setMaxWidth(1920); + options.setMaxHeight(1080); + options.setQuality((byte) 96); + options.setRenderComments(true); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(options); + // Use the viewer object for further operations + } + +``` + +***Note:** The JpgViewOptions class implements the IMaxSizeOptions interface to specify the maximum size of the output JPG images.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [JpgViewOptions(CreatePageStream createPageStream)](#JpgViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-) | Initializes a new instance of the JpgViewOptions class. | +| [JpgViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream)](#JpgViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.ReleasePageStream-) | Initializes a new instance of the JpgViewOptions class. | +| [JpgViewOptions(PageStreamFactory pageStreamFactory)](#JpgViewOptions-com.groupdocs.viewer.interfaces.PageStreamFactory-) | Initializes a new instance of the JpgViewOptions class. | +| [JpgViewOptions()](#JpgViewOptions--) | Initializes a new instance of JpgViewOptions with "p\_\{0\}.jpg" as the file path format for the output files. | +| [JpgViewOptions(String filePathFormat)](#JpgViewOptions-java.lang.String-) | Initializes a new instance of the JpgViewOptions class. | +| [JpgViewOptions(Path filePathFormat)](#JpgViewOptions-java.nio.file.Path-) | Initializes a new instance of the JpgViewOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [getMaxWidth()](#getMaxWidth--) | Gets the maximum width of an output image in pixels. | +| [setMaxWidth(int maxWidth)](#setMaxWidth-int-) | Sets the maximum width of an output image in pixels. | +| [getMaxHeight()](#getMaxHeight--) | Gets the maximum height of an output image in pixels. | +| [setMaxHeight(int maxHeight)](#setMaxHeight-int-) | Sets the maximum height of an output image in pixels. | +| [getQuality()](#getQuality--) | Gets the quality of the output image. | +| [setQuality(int value)](#setQuality-int-) | Sets the quality of the output image. | +| [isExtractText()](#isExtractText--) | Enables text extraction. | +| [setExtractText(boolean value)](#setExtractText-boolean-) | Enables or disables text extraction. | +| [getWidth()](#getWidth--) | Gets the width of the output image in pixels. | +| [setWidth(int value)](#setWidth-int-) | Sets the width of the output image in pixels. | +| [getHeight()](#getHeight--) | Gets the height of the output image in pixels. | +| [setHeight(int value)](#setHeight-int-) | Sets the height of the output image in pixels. | +| [getPageStreamFactory()](#getPageStreamFactory--) | Gets the factory that implements methods for creating and releasing the output page stream. | +| [getDocumentSavingCallback()](#getDocumentSavingCallback--) | Gets the callback to estimate the saving progress of a Words or Email document. | +| [setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback)](#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-) | Sets the callback to estimate the saving progress of a Words or Email document. | +### JpgViewOptions(CreatePageStream createPageStream) {#JpgViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-} +``` +public JpgViewOptions(CreatePageStream createPageStream) +``` + + +Initializes a new instance of the JpgViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates the stream used to write the output page data. | + +### JpgViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream) {#JpgViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.ReleasePageStream-} +``` +public JpgViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream) +``` + + +Initializes a new instance of the JpgViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates the stream used to write the output page data. | +| releasePageStream | [ReleasePageStream](../../com.groupdocs.viewer.interfaces/releasepagestream) | The method that releases the stream created by the method assigned to the delegate passed to the createPageStream parameter. | + +### JpgViewOptions(PageStreamFactory pageStreamFactory) {#JpgViewOptions-com.groupdocs.viewer.interfaces.PageStreamFactory-} +``` +public JpgViewOptions(PageStreamFactory pageStreamFactory) +``` + + +Initializes a new instance of the JpgViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageStreamFactory | [PageStreamFactory](../../com.groupdocs.viewer.interfaces/pagestreamfactory) | The factory that implements methods for creating and releasing the output page stream. | + +### JpgViewOptions() {#JpgViewOptions--} +``` +public JpgViewOptions() +``` + + +Initializes a new instance of JpgViewOptions with "p\_\{0\}.jpg" as the file path format for the output files. The output files will be placed into the current working directory of the application. + +### JpgViewOptions(String filePathFormat) {#JpgViewOptions-java.lang.String-} +``` +public JpgViewOptions(String filePathFormat) +``` + + +Initializes a new instance of the JpgViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePathFormat | java.lang.String | The file path format, e.g., 'page\_\{0\}.jpg'. | + +### JpgViewOptions(Path filePathFormat) {#JpgViewOptions-java.nio.file.Path-} +``` +public JpgViewOptions(Path filePathFormat) +``` + + +Initializes a new instance of the JpgViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePathFormat | java.nio.file.Path | The file path format, e.g., 'page\_\{0\}.jpg'. | + +### getMaxWidth() {#getMaxWidth--} +``` +public int getMaxWidth() +``` + + +Gets the maximum width of an output image in pixels. + +**Returns:** +int - the maximum width of an output image. +### setMaxWidth(int maxWidth) {#setMaxWidth-int-} +``` +public void setMaxWidth(int maxWidth) +``` + + +Sets the maximum width of an output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxWidth | int | The maximum width of an output image. | + +### getMaxHeight() {#getMaxHeight--} +``` +public int getMaxHeight() +``` + + +Gets the maximum height of an output image in pixels. + +**Returns:** +int - the maximum height of an output image. +### setMaxHeight(int maxHeight) {#setMaxHeight-int-} +``` +public void setMaxHeight(int maxHeight) +``` + + +Sets the maximum height of an output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxHeight | int | The maximum height of an output image. | + +### getQuality() {#getQuality--} +``` +public final int getQuality() +``` + + +Gets the quality of the output image. + +***Note:** Valid values are between 1 and 100. The default value is 90.* + +**Returns:** +int - the quality of the output image. +### setQuality(int value) {#setQuality-int-} +``` +public final void setQuality(int value) +``` + + +Sets the quality of the output image. + +***Note:** Valid values are between 1 and 100. The default value is 90.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The quality of the output image. | + +### isExtractText() {#isExtractText--} +``` +public final boolean isExtractText() +``` + + +Enables text extraction. + +***Note:** This option might be useful when you want to add a selectable text layer over the image.* + +**Returns:** +boolean - true if text extraction is enabled, false otherwise. +### setExtractText(boolean value) {#setExtractText-boolean-} +``` +public final void setExtractText(boolean value) +``` + + +Enables or disables text extraction. + +***Note:** This option might be useful when you want to add a selectable text layer over the image.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable text extraction, false to disable it. | + +### getWidth() {#getWidth--} +``` +public final int getWidth() +``` + + +Gets the width of the output image in pixels. + +**Returns:** +int - the width of the output image. +### setWidth(int value) {#setWidth-int-} +``` +public final void setWidth(int value) +``` + + +Sets the width of the output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The width of the output image. | + +### getHeight() {#getHeight--} +``` +public final int getHeight() +``` + + +Gets the height of the output image in pixels. + +**Returns:** +int - the height of the output image. +### setHeight(int value) {#setHeight-int-} +``` +public final void setHeight(int value) +``` + + +Sets the height of the output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The height of the output image. | + +### getPageStreamFactory() {#getPageStreamFactory--} +``` +public final PageStreamFactory getPageStreamFactory() +``` + + +Gets the factory that implements methods for creating and releasing the output page stream. + +**Returns:** +[PageStreamFactory](../../com.groupdocs.viewer.interfaces/pagestreamfactory) - the factory for the output page stream. +### getDocumentSavingCallback() {#getDocumentSavingCallback--} +``` +public IDocumentSavingCallback getDocumentSavingCallback() +``` + + +Gets the callback to estimate the saving progress of a Words or Email document. + +**Returns:** +com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback - the callback to estimate the document saving progress. +### setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) {#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-} +``` +public void setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) +``` + + +Sets the callback to estimate the saving progress of a Words or Email document. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| documentSavingCallback | com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback | The callback to estimate the document saving progress. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/loadoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/loadoptions/_index.md new file mode 100644 index 00000000..9e0ffbea --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/loadoptions/_index.md @@ -0,0 +1,411 @@ +--- +title: LoadOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options that are used to open a file. +type: docs +weight: 18 +url: /nodejs-java/com.groupdocs.viewer.options/loadoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class LoadOptions +``` + +Provides options that are used to open a file. + +The LoadOptions class encapsulates various settings and parameters that can be used to specify how a file should be opened and loaded in the GroupDocs.Viewer component. + +Example usage: + +``` + + LoadOptions options = new LoadOptions(); + options.setPassword("myPassword"); + options.setFileType(PDF); + options.setCharset(Charset.forName("UTF-8")); + + try (Viewer viewer = new Viewer(pdfFileInputStream, options)) { + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [LoadOptions()](#LoadOptions--) | Initializes a new instance of the LoadOptions class. | +| [LoadOptions(FileType fileType)](#LoadOptions-com.groupdocs.viewer.FileType-) | Initializes a new instance of the LoadOptions class. | +## Fields + +| Field | Description | +| --- | --- | +| [DEFAULT_URL_CONNECT_TIMEOUT](#DEFAULT-URL-CONNECT-TIMEOUT) | | +| [DEFAULT_URL_READ_TIMEOUT](#DEFAULT-URL-READ-TIMEOUT) | | +## Methods + +| Method | Description | +| --- | --- | +| [getFileType()](#getFileType--) | Gets the type of the file to open. | +| [setFileType(FileType value)](#setFileType-com.groupdocs.viewer.FileType-) | Sets the type of the file to open. | +| [getPassword()](#getPassword--) | Gets the password for opening an encrypted file. | +| [setPassword(String value)](#setPassword-java.lang.String-) | Sets the password for opening an encrypted file. | +| [getCharset()](#getCharset--) | The charset used when opening text-based files or email messages such as [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV), [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), and [FileType.MSG](../../com.groupdocs.viewer/filetype\#MSG). | +| [setCharset(Charset value)](#setCharset-java.nio.charset.Charset-) | The charset used when opening text-based files or email messages such as [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV), [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), and [FileType.MSG](../../com.groupdocs.viewer/filetype\#MSG). | +| [setCharset(String charsetName)](#setCharset-java.lang.String-) | | +| [isDetectCharset()](#isDetectCharset--) | This option enables [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), [FileType.TSV](../../com.groupdocs.viewer/filetype\#TSV), and [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV) files charset detection. | +| [setDetectCharset(boolean detectCharset)](#setDetectCharset-boolean-) | This option enables [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), [FileType.TSV](../../com.groupdocs.viewer/filetype\#TSV), and [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV) files charset detection. | +| [getResourceLoadingTimeout()](#getResourceLoadingTimeout--) | Gets the timeout for loading external resources, such as graphics. | +| [setResourceLoadingTimeout(int resourceLoadingTimeout)](#setResourceLoadingTimeout-int-) | Sets the timeout for loading external resources, such as graphics. | +| [getUrlConnectTimeout()](#getUrlConnectTimeout--) | Gets the connection timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. | +| [setUrlConnectTimeout(int urlConnectTimeout)](#setUrlConnectTimeout-int-) | Sets the connection timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. | +| [getUrlReadTimeout()](#getUrlReadTimeout--) | Gets the read timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. | +| [setUrlReadTimeout(int urlReadTimeout)](#setUrlReadTimeout-int-) | Sets the read timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. | +| [getArchiveSecurityOptions()](#getArchiveSecurityOptions--) | Gets the security options to control the process of extracting archives. | +| [setArchiveSecurityOptions(ArchiveSecurityOptions archiveSecurityOptions)](#setArchiveSecurityOptions-com.groupdocs.viewer.options.ArchiveSecurityOptions-) | Sets the security options to control the process of extracting archives. | +### LoadOptions() {#LoadOptions--} +``` +public LoadOptions() +``` + + +Initializes a new instance of the LoadOptions class. + +### LoadOptions(FileType fileType) {#LoadOptions-com.groupdocs.viewer.FileType-} +``` +public LoadOptions(FileType fileType) +``` + + +Initializes a new instance of the LoadOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileType | [FileType](../../com.groupdocs.viewer/filetype) | The type of the file to open. | + +### DEFAULT_URL_CONNECT_TIMEOUT {#DEFAULT-URL-CONNECT-TIMEOUT} +``` +public static final int DEFAULT_URL_CONNECT_TIMEOUT +``` + + +### DEFAULT_URL_READ_TIMEOUT {#DEFAULT-URL-READ-TIMEOUT} +``` +public static final int DEFAULT_URL_READ_TIMEOUT +``` + + +### getFileType() {#getFileType--} +``` +public final FileType getFileType() +``` + + +Gets the type of the file to open. + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the file type. +### setFileType(FileType value) {#setFileType-com.groupdocs.viewer.FileType-} +``` +public final void setFileType(FileType value) +``` + + +Sets the type of the file to open. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [FileType](../../com.groupdocs.viewer/filetype) | The file type. | + +### getPassword() {#getPassword--} +``` +public final String getPassword() +``` + + +Gets the password for opening an encrypted file. + +**Returns:** +java.lang.String - the password for opening the file. +### setPassword(String value) {#setPassword-java.lang.String-} +``` +public final void setPassword(String value) +``` + + +Sets the password for opening an encrypted file. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The password for opening the file. | + +### getCharset() {#getCharset--} +``` +public final Charset getCharset() +``` + + +The charset used when opening text-based files or email messages such as [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV), [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), and [FileType.MSG](../../com.groupdocs.viewer/filetype\#MSG). + +Default value is java.nio.charset.StandardCharsets\#UTF\_8.UTF\_8. + +**Learn more** + + * [Render Excel and Apple Numbers spreadsheets as HTML, PDF, and image files][Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files] + * [Render text documents as HTML, PDF, and image files][Render text documents as HTML_ PDF_ and image files] + * [Render email messages as HTML, PDF, PNG, and JPEG files][Render email messages as HTML_ PDF_ PNG_ and JPEG files] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setCharset(StandardCharsets.US_ASCII); // Set the charset + + try (Viewer viewer = new Viewer("message.txt", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/ +[Render text documents as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-text-files +[Render email messages as HTML_ PDF_ PNG_ and JPEG files]: https://docs.groupdocs.com/viewer/java/render-email-messages/ + +**Returns:** +java.nio.charset.Charset +### setCharset(Charset value) {#setCharset-java.nio.charset.Charset-} +``` +public final void setCharset(Charset value) +``` + + +The charset used when opening text-based files or email messages such as [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV), [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), and [FileType.MSG](../../com.groupdocs.viewer/filetype\#MSG). + +Default value is java.nio.charset.StandardCharsets\#UTF\_8.UTF\_8. + +**Learn more** + + * [Render Excel and Apple Numbers spreadsheets as HTML, PDF, and image files][Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files] + * [Render text documents as HTML, PDF, and image files][Render text documents as HTML_ PDF_ and image files] + * [Render email messages as HTML, PDF, PNG, and JPEG files][Render email messages as HTML_ PDF_ PNG_ and JPEG files] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setCharset(StandardCharsets.US_ASCII); // Set the charset + + try (Viewer viewer = new Viewer("message.txt", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/ +[Render text documents as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-text-files +[Render email messages as HTML_ PDF_ PNG_ and JPEG files]: https://docs.groupdocs.com/viewer/java/render-email-messages/ + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.nio.charset.Charset | | + +### setCharset(String charsetName) {#setCharset-java.lang.String-} +``` +public final void setCharset(String charsetName) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| charsetName | java.lang.String | | + +### isDetectCharset() {#isDetectCharset--} +``` +public boolean isDetectCharset() +``` + + +This option enables [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), [FileType.TSV](../../com.groupdocs.viewer/filetype\#TSV), and [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV) files charset detection. In case the charset can't be detected the default [getCharset()](../../com.groupdocs.viewer.options/loadoptions\#getCharset--) is used. + +**Learn more about rendering text and tab/comma delimited files** + + * [Render text documents as HTML, PDF, and image files][Render text documents as HTML_ PDF_ and image files] + * [Render Excel and Apple Numbers spreadsheets as HTML, PDF, and image files][Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setDetectCharset(true); // Enable encoding detection + + try (Viewer viewer = new Viewer("employees.csv", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Render text documents as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-text-files/ +[Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/ + +**Returns:** +boolean +### setDetectCharset(boolean detectCharset) {#setDetectCharset-boolean-} +``` +public void setDetectCharset(boolean detectCharset) +``` + + +This option enables [FileType.TXT](../../com.groupdocs.viewer/filetype\#TXT), [FileType.TSV](../../com.groupdocs.viewer/filetype\#TSV), and [FileType.CSV](../../com.groupdocs.viewer/filetype\#CSV) files charset detection. In case the charset can't be detected the default [getCharset()](../../com.groupdocs.viewer.options/loadoptions\#getCharset--) is used. + +**Learn more about rendering text and tab/comma delimited files** + + * [Render text documents as HTML, PDF, and image files][Render text documents as HTML_ PDF_ and image files] + * [Render Excel and Apple Numbers spreadsheets as HTML, PDF, and image files][Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setDetectCharset(true); // Enable encoding detection + + try (Viewer viewer = new Viewer("employees.csv", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Render text documents as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-text-files/ +[Render Excel and Apple Numbers spreadsheets as HTML_ PDF_ and image files]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/ + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| detectCharset | boolean | | + +### getResourceLoadingTimeout() {#getResourceLoadingTimeout--} +``` +public int getResourceLoadingTimeout() +``` + + +Gets the timeout for loading external resources, such as graphics. + +***Note:** The default value is 30 seconds.* + +This option is supported for Word Processing documents that contain external resources. + +**Returns:** +int - the loading timeout, milliseconds. +### setResourceLoadingTimeout(int resourceLoadingTimeout) {#setResourceLoadingTimeout-int-} +``` +public void setResourceLoadingTimeout(int resourceLoadingTimeout) +``` + + +Sets the timeout for loading external resources, such as graphics. + +***Note:** The default value is 30 seconds.* + +This option is supported for Word Processing documents that contain external resources. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| resourceLoadingTimeout | int | The loading timeout, milliseconds. | + +### getUrlConnectTimeout() {#getUrlConnectTimeout--} +``` +public int getUrlConnectTimeout() +``` + + +Gets the connection timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. + +***Note:** The default value is 5 seconds.* + +**Returns:** +int - the connection timeout. +### setUrlConnectTimeout(int urlConnectTimeout) {#setUrlConnectTimeout-int-} +``` +public void setUrlConnectTimeout(int urlConnectTimeout) +``` + + +Sets the connection timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. + +***Note:** The default value is 5 seconds.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| urlConnectTimeout | int | The connection timeout. | + +### getUrlReadTimeout() {#getUrlReadTimeout--} +``` +public int getUrlReadTimeout() +``` + + +Gets the read timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. + +***Note:** The default value is 30 seconds.* + +**Returns:** +int - the read timeout. +### setUrlReadTimeout(int urlReadTimeout) {#setUrlReadTimeout-int-} +``` +public void setUrlReadTimeout(int urlReadTimeout) +``` + + +Sets the read timeout for creating a [Viewer](../../com.groupdocs.viewer/viewer) using java.net.URL to load a document. + +***Note:** The default value is 30 seconds.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| urlReadTimeout | int | The read timeout. | + +### getArchiveSecurityOptions() {#getArchiveSecurityOptions--} +``` +public ArchiveSecurityOptions getArchiveSecurityOptions() +``` + + +Gets the security options to control the process of extracting archives. + +***Note:** Not each archive type supports all options.* + +**Returns:** +com.groupdocs.viewer.options.ArchiveSecurityOptions - the options object to configure the process of extracting archives. +### setArchiveSecurityOptions(ArchiveSecurityOptions archiveSecurityOptions) {#setArchiveSecurityOptions-com.groupdocs.viewer.options.ArchiveSecurityOptions-} +``` +public void setArchiveSecurityOptions(ArchiveSecurityOptions archiveSecurityOptions) +``` + + +Sets the security options to control the process of extracting archives. + +***Note:** Not each archive type supports all options.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| archiveSecurityOptions | com.groupdocs.viewer.options.ArchiveSecurityOptions | The options object to configure the process of extracting archives. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/mailstorageoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/mailstorageoptions/_index.md new file mode 100644 index 00000000..3830b2a5 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/mailstorageoptions/_index.md @@ -0,0 +1,133 @@ +--- +title: MailStorageOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering Mail storage Lotus Notes MBox data files. +type: docs +weight: 19 +url: /nodejs-java/com.groupdocs.viewer.options/mailstorageoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class MailStorageOptions +``` + +Provides options for rendering Mail storage (Lotus Notes, MBox) data files. + +The MailStorageOptions class encapsulates various settings and parameters that can be used to control the rendering of Mail storage data files (such as Lotus Notes or MBox) in the GroupDocs.Viewer component. + +Example usage: + +``` + + MailStorageOptions options = new MailStorageOptions(); + options.setAddressFilter("@gmail.com"); + options.setMaxItems(10); + + final HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources(); + htmlViewOptions.setMailStorageOptions(options); + + try (Viewer viewer = new Viewer("mail.msg")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [MailStorageOptions()](#MailStorageOptions--) | | +## Methods + +| Method | Description | +| --- | --- | +| [getTextFilter()](#getTextFilter--) | Gets the keywords used to filter messages. | +| [setTextFilter(String textFilter)](#setTextFilter-java.lang.String-) | Sets the keywords used to filter messages. | +| [getAddressFilter()](#getAddressFilter--) | Gets the email address used to filter messages by sender or recipient. | +| [setAddressFilter(String addressFilter)](#setAddressFilter-java.lang.String-) | Sets the email address used to filter messages by sender or recipient. | +| [getMaxItems()](#getMaxItems--) | Gets the maximum number of messages or items to render. | +| [setMaxItems(int maxItems)](#setMaxItems-int-) | Sets the maximum number of messages or items to render. | +### MailStorageOptions() {#MailStorageOptions--} +``` +public MailStorageOptions() +``` + + +### getTextFilter() {#getTextFilter--} +``` +public String getTextFilter() +``` + + +Gets the keywords used to filter messages. + +**Returns:** +java.lang.String - the keywords used for filtering messages. +### setTextFilter(String textFilter) {#setTextFilter-java.lang.String-} +``` +public void setTextFilter(String textFilter) +``` + + +Sets the keywords used to filter messages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| textFilter | java.lang.String | The keywords used for filtering messages. | + +### getAddressFilter() {#getAddressFilter--} +``` +public String getAddressFilter() +``` + + +Gets the email address used to filter messages by sender or recipient. + +**Returns:** +java.lang.String - the email address used for filtering messages. +### setAddressFilter(String addressFilter) {#setAddressFilter-java.lang.String-} +``` +public void setAddressFilter(String addressFilter) +``` + + +Sets the email address used to filter messages by sender or recipient. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| addressFilter | java.lang.String | The email address used for filtering messages. | + +### getMaxItems() {#getMaxItems--} +``` +public int getMaxItems() +``` + + +Gets the maximum number of messages or items to render. + +Lotus Notes data files can be large, and retrieving all messages can take significant time. This setting limits the maximum number of messages or items that are rendered. + +***Note:** The default value is 0, which means all messages will be rendered.* + +**Returns:** +int - the maximum number of messages or items to render. +### setMaxItems(int maxItems) {#setMaxItems-int-} +``` +public void setMaxItems(int maxItems) +``` + + +Sets the maximum number of messages or items to render. + +Lotus Notes data files can be large, and retrieving all messages can take significant time. This setting limits the maximum number of messages or items that are rendered. + +***Note:** The default value is 0, which means all messages will be rendered.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxItems | int | The maximum number of messages or items to render. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/outlookoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/outlookoptions/_index.md new file mode 100644 index 00000000..43a64208 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/outlookoptions/_index.md @@ -0,0 +1,154 @@ +--- +title: OutlookOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering Outlook data files. +type: docs +weight: 20 +url: /nodejs-java/com.groupdocs.viewer.options/outlookoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class OutlookOptions +``` + +Provides options for rendering Outlook data files. + +The OutlookOptions class encapsulates various settings and parameters that can be used to control the rendering of Outlook data files (such as PST or OST files) in the GroupDocs.Viewer component. + +Example usage: + +``` + + OutlookOptions options = new OutlookOptions(); + options.setAddressFilter("@gmail.com"); + options.setFolder("folderName"); + + final HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources(); + htmlViewOptions.setOutlookOptions(options); + + try (Viewer viewer = new Viewer("mail.pst")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [OutlookOptions()](#OutlookOptions--) | | +## Methods + +| Method | Description | +| --- | --- | +| [getFolder()](#getFolder--) | Gets the name of the folder to render. | +| [setFolder(String value)](#setFolder-java.lang.String-) | Sets the name of the folder to render. | +| [getTextFilter()](#getTextFilter--) | Gets the keywords used to filter messages. | +| [setTextFilter(String value)](#setTextFilter-java.lang.String-) | Gets the keywords used to filter messages. | +| [getAddressFilter()](#getAddressFilter--) | Gets the email address used to filter messages by sender or recipient. | +| [setAddressFilter(String value)](#setAddressFilter-java.lang.String-) | Sets the email address used to filter messages by sender or recipient. | +| [getMaxItemsInFolder()](#getMaxItemsInFolder--) | Gets the maximum number of messages or items that can be rendered from one folder. | +| [setMaxItemsInFolder(int value)](#setMaxItemsInFolder-int-) | Sets the maximum number of messages or items that can be rendered from one folder. | +### OutlookOptions() {#OutlookOptions--} +``` +public OutlookOptions() +``` + + +### getFolder() {#getFolder--} +``` +public final String getFolder() +``` + + +Gets the name of the folder to render. The name of the folder (e.g., Inbox, Sent Item, or Deleted Items) to render. + +**Returns:** +java.lang.String - the name of the folder to render. +### setFolder(String value) {#setFolder-java.lang.String-} +``` +public final void setFolder(String value) +``` + + +Sets the name of the folder to render. The name of the folder (e.g., Inbox, Sent Item, or Deleted Items) to render. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The name of the folder to render. | + +### getTextFilter() {#getTextFilter--} +``` +public final String getTextFilter() +``` + + +Gets the keywords used to filter messages. + +**Returns:** +java.lang.String - the keywords. +### setTextFilter(String value) {#setTextFilter-java.lang.String-} +``` +public final void setTextFilter(String value) +``` + + +Gets the keywords used to filter messages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The keywords. | + +### getAddressFilter() {#getAddressFilter--} +``` +public final String getAddressFilter() +``` + + +Gets the email address used to filter messages by sender or recipient. + +**Returns:** +java.lang.String - the email address used to filter messages. +### setAddressFilter(String value) {#setAddressFilter-java.lang.String-} +``` +public final void setAddressFilter(String value) +``` + + +Sets the email address used to filter messages by sender or recipient. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The email address used to filter messages. | + +### getMaxItemsInFolder() {#getMaxItemsInFolder--} +``` +public final int getMaxItemsInFolder() +``` + + +Gets the maximum number of messages or items that can be rendered from one folder. + +Outlook data files can be large and retrieving all messages can take significant time. This setting limits the maximum number of messages or items (such as contacts and tasks) that are rendered. The default value is 50. Set the value to 0 to render all messages. + +**Returns:** +int - the maximum number of messages or items that can be rendered from one folder. +### setMaxItemsInFolder(int value) {#setMaxItemsInFolder-int-} +``` +public final void setMaxItemsInFolder(int value) +``` + + +Sets the maximum number of messages or items that can be rendered from one folder. + +Outlook data files can be large and retrieving all messages can take significant time. This setting limits the maximum number of messages or items (such as contacts and tasks) that are rendered. The default value is 50. Set the value to 0 to render all messages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The maximum number of messages or items that can be rendered from one folder. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/pagesize/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/pagesize/_index.md new file mode 100644 index 00000000..448067dc --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/pagesize/_index.md @@ -0,0 +1,139 @@ +--- +title: PageSize +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The size of the page. +type: docs +weight: 38 +url: /nodejs-java/com.groupdocs.viewer.options/pagesize/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum PageSize extends Enum +``` + +The size of the page. + +The PageSize enum represents different page sizes in the GroupDocs.Viewer component. It provides a set of predefined page sizes that can be used to specify the dimensions of a page in various document rendering scenarios. + +Example usage: + +``` + + HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources(); + ProjectManagementOptions projectManagementOptions = htmlViewOptions.getProjectManagementOptions(); + projectManagementOptions.setPageSize(PageSize.A4); + + try (Viewer viewer = new Viewer("document.mpp")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [UNSPECIFIED](#UNSPECIFIED) | The default, unspecified page size. | +| [LETTER](#LETTER) | The size of the Letter page in points is 792 x 612. | +| [LEDGER](#LEDGER) | The size of the A0 page in points is 3371 x 2384. | +| [A0](#A0) | The size of the A1 page in points is 2384 x 1685. | +| [A1](#A1) | The size of the A2 page in points is 1684 x 1190. | +| [A2](#A2) | The size of the A3 page in points is 1190 x 842. | +| [A3](#A3) | The size of the A3 page in points is 1190 x 842. | +| [A4](#A4) | The size of the A4 page in points is 842 x 595. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +### UNSPECIFIED {#UNSPECIFIED} +``` +public static final PageSize UNSPECIFIED +``` + + +The default, unspecified page size. This size is used when no specific page size is specified. + +### LETTER {#LETTER} +``` +public static final PageSize LETTER +``` + + +The size of the Letter page in points is 792 x 612. This page size is commonly used for letters and documents in North America. + +### LEDGER {#LEDGER} +``` +public static final PageSize LEDGER +``` + + +The size of the A0 page in points is 3371 x 2384. This large page size is part of the ISO 216 international standard. + +### A0 {#A0} +``` +public static final PageSize A0 +``` + + +The size of the A1 page in points is 2384 x 1685. This page size is part of the ISO 216 international standard. + +### A1 {#A1} +``` +public static final PageSize A1 +``` + + +The size of the A2 page in points is 1684 x 1190. This page size is part of the ISO 216 international standard. + +### A2 {#A2} +``` +public static final PageSize A2 +``` + + +The size of the A3 page in points is 1190 x 842. This page size is part of the ISO 216 international standard. + +### A3 {#A3} +``` +public static final PageSize A3 +``` + + +The size of the A3 page in points is 1190 x 842. This page size is part of the ISO 216 international standard. + +### A4 {#A4} +``` +public static final PageSize A4 +``` + + +The size of the A4 page in points is 842 x 595. This page size is part of the ISO 216 international standard. + +### values() {#values--} +``` +public static PageSize[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.options.PageSize[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static PageSize valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[PageSize](../../com.groupdocs.viewer.options/pagesize) diff --git a/english/nodejs-java/com.groupdocs.viewer.options/pdfoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/pdfoptions/_index.md new file mode 100644 index 00000000..683880b6 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/pdfoptions/_index.md @@ -0,0 +1,266 @@ +--- +title: PdfOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering PDF documents. +type: docs +weight: 21 +url: /nodejs-java/com.groupdocs.viewer.options/pdfoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class PdfOptions +``` + +Provides options for rendering PDF documents. + +The PdfOptions class encapsulates various settings and parameters that can be used to control the rendering of PDF documents in the GroupDocs.Viewer component. + +Example usage: + +``` + + PdfOptions options = new PdfOptions(); + options.setDisableCharsGrouping(true); + options.setRenderTextAsImage(true); + options.setEnableFontHinting(true); + + final HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources(); + htmlViewOptions.setPdfOptions(options); + + try (Viewer viewer = new Viewer("document.pdf")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [PdfOptions()](#PdfOptions--) | Initializes a new instance of PdfOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [isRenderTextAsImage()](#isRenderTextAsImage--) | Determines whether the text from the source is rendered as an image in HTML. | +| [setRenderTextAsImage(boolean renderTextAsImage)](#setRenderTextAsImage-boolean-) | Sets whether the text from the source is rendered as an image in HTML. | +| [isDisableCharsGrouping()](#isDisableCharsGrouping--) | Checks if character grouping is disabled to maintain maximum precision during character positioning when rendering the page. | +| [setDisableCharsGrouping(boolean value)](#setDisableCharsGrouping-boolean-) | Sets the option to disable character grouping, ensuring maximum precision during character positioning when rendering the page. | +| [isEnableLayeredRendering()](#isEnableLayeredRendering--) | Checks whether rendering of text and graphics should follow the z-order in the original PDF document when rendering into HTML. | +| [setEnableLayeredRendering(boolean value)](#setEnableLayeredRendering-boolean-) | Enables or disables rendering of text and graphics according to the z-order in the original PDF document when rendering into HTML. | +| [isEnableFontHinting()](#isEnableFontHinting--) | Determines whether font hinting is enabled. | +| [setEnableFontHinting(boolean value)](#setEnableFontHinting-boolean-) | Enables font hinting. | +| [isRenderOriginalPageSize()](#isRenderOriginalPageSize--) | Enables rendering of pages with the same size in pixels as the page size in the source PDF document. | +| [setRenderOriginalPageSize(boolean renderOriginalPageSize)](#setRenderOriginalPageSize-boolean-) | Enables rendering of pages with the same size in pixels as the page size in the source PDF document. | +| [getImageQuality()](#getImageQuality--) | Retrieves the output image quality for image resources when rendering into HTML. | +| [setImageQuality(ImageQuality value)](#setImageQuality-com.groupdocs.viewer.options.ImageQuality-) | Sets the output image quality for image resources when rendering into HTML. | +| [isFixedLayout()](#isFixedLayout--) | PDF is a fixed format so all of the elements have a specific place on a page. | +| [setFixedLayout(boolean fixedLayout)](#setFixedLayout-boolean-) | | +### PdfOptions() {#PdfOptions--} +``` +public PdfOptions() +``` + + +Initializes a new instance of PdfOptions class. + +### isRenderTextAsImage() {#isRenderTextAsImage--} +``` +public boolean isRenderTextAsImage() +``` + + +Determines whether the text from the source is rendered as an image in HTML. + +When this option is set to true , the text is rendered as an image in the output HTML. Enable this option to make the text unselectable or to fix character rendering and make the HTML look like PDF. This option is supported when rendering into HTML. + +***Note:** The default value is false .* + +**Returns:** +boolean - true if the text is rendered as an image in HTML, false otherwise. +### setRenderTextAsImage(boolean renderTextAsImage) {#setRenderTextAsImage-boolean-} +``` +public void setRenderTextAsImage(boolean renderTextAsImage) +``` + + +Sets whether the text from the source is rendered as an image in HTML. + +When this option is set to true , the text is rendered as an image in the output HTML. Enable this option to make the text unselectable or to fix character rendering and make the HTML look like PDF. This option is supported when rendering into HTML. + +***Note:** The default value is false .* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderTextAsImage | boolean | true to render the text as an image in HTML, false otherwise. | + +### isDisableCharsGrouping() {#isDisableCharsGrouping--} +``` +public final boolean isDisableCharsGrouping() +``` + + +Checks if character grouping is disabled to maintain maximum precision during character positioning when rendering the page. When this option is enabled, the characters are rendered without any grouping, which ensures maximum precision. + +***Note:** By default, character grouping is enabled.* + +**Returns:** +boolean - true if character grouping is disabled, false otherwise. +### setDisableCharsGrouping(boolean value) {#setDisableCharsGrouping-boolean-} +``` +public final void setDisableCharsGrouping(boolean value) +``` + + +Sets the option to disable character grouping, ensuring maximum precision during character positioning when rendering the page. When this option is enabled by setting the value to true , character grouping is disabled, which ensures maximum precision. + +***Note:** Disabling character grouping can help preserve the exact positioning of characters on the rendered page. By default, character grouping is enabled.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to disable character grouping, false to enable it. | + +### isEnableLayeredRendering() {#isEnableLayeredRendering--} +``` +public final boolean isEnableLayeredRendering() +``` + + +Checks whether rendering of text and graphics should follow the z-order in the original PDF document when rendering into HTML. When this option is enabled by returning true , text and graphics are rendered according to their z-order in the original PDF document. + +***Note:** By default, text and graphics are rendered into HTML as a single layer.* + +**Returns:** +boolean - true if layered rendering is enabled, false otherwise. +### setEnableLayeredRendering(boolean value) {#setEnableLayeredRendering-boolean-} +``` +public final void setEnableLayeredRendering(boolean value) +``` + + +Enables or disables rendering of text and graphics according to the z-order in the original PDF document when rendering into HTML. + +***Note:** By default, text and graphics are rendered into HTML as a single layer.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable layered rendering, false to disable it. | + +### isEnableFontHinting() {#isEnableFontHinting--} +``` +public final boolean isEnableFontHinting() +``` + + +Determines whether font hinting is enabled. Font hinting adjusts the display of an outline font. This option is supported only for TrueType (TTF) fonts when used in the source document. + +***Note:** This option is supported when rendering into PNG or JPG formats.* + +**Returns:** +boolean - true if font hinting is enabled, false otherwise. +### setEnableFontHinting(boolean value) {#setEnableFontHinting-boolean-} +``` +public final void setEnableFontHinting(boolean value) +``` + + +Enables font hinting. Font hinting adjusts the display of an outline font and is supported only for TrueType (TTF) fonts when used in the source document. + +***Note:** This option is supported when rendering into PNG or JPG formats.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable font hinting, false to disable it. | + +### isRenderOriginalPageSize() {#isRenderOriginalPageSize--} +``` +public boolean isRenderOriginalPageSize() +``` + + +Enables rendering of pages with the same size in pixels as the page size in the source PDF document. + +***Note:** By default, GroupDocs.Viewer calculates the output image page size for better rendering quality.* + +**Returns:** +boolean - true if the option is enabled, false otherwise. +### setRenderOriginalPageSize(boolean renderOriginalPageSize) {#setRenderOriginalPageSize-boolean-} +``` +public void setRenderOriginalPageSize(boolean renderOriginalPageSize) +``` + + +Enables rendering of pages with the same size in pixels as the page size in the source PDF document. + +***Note:** By default, GroupDocs.Viewer calculates the output image page size for better rendering quality.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderOriginalPageSize | boolean | true to enable rendering with the original page size, false otherwise. | + +### getImageQuality() {#getImageQuality--} +``` +public final ImageQuality getImageQuality() +``` + + +Retrieves the output image quality for image resources when rendering into HTML. The default value is Low. + +**Returns:** +[ImageQuality](../../com.groupdocs.viewer.options/imagequality) - the output image quality for image resources when rendering into HTML. +### setImageQuality(ImageQuality value) {#setImageQuality-com.groupdocs.viewer.options.ImageQuality-} +``` +public final void setImageQuality(ImageQuality value) +``` + + +Sets the output image quality for image resources when rendering into HTML. The default value is Low. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [ImageQuality](../../com.groupdocs.viewer.options/imagequality) | The output image quality for image resources when rendering into HTML. | + +### isFixedLayout() {#isFixedLayout--} +``` +public boolean isFixedLayout() +``` + + +PDF is a fixed format so all of the elements have a specific place on a page. To ensure that the output HTML looks the same as the source PDF the documents are rendered to HTML with a fixed layout by default. When rendering with fixed layout the output HTML has fixed size so the elements will stay on the same place regardless of window size. To render to HTML with fluid layout set this property to false. + +***Note:** The default value is true. This option is supported when rendering into HTML. When rendering to fluid layout images are skipped. Use fluid layout when rendering PDF documents with textual content.* + +Example usage: + +``` + + try (Viewer viewer = new Viewer("resume.pdf")) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources("page_{0}.html"); + viewOptions.setFixedLayout(false); + viewer.view(viewOptions); + } + +``` + +**Returns:** +boolean - true if it is fixed layout +### setFixedLayout(boolean fixedLayout) {#setFixedLayout-boolean-} +``` +public void setFixedLayout(boolean fixedLayout) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fixedLayout | boolean | | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/pdfviewoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/pdfviewoptions/_index.md new file mode 100644 index 00000000..abfa0149 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/pdfviewoptions/_index.md @@ -0,0 +1,371 @@ +--- +title: PdfViewOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering documents into PDF format. +type: docs +weight: 22 +url: /nodejs-java/com.groupdocs.viewer.options/pdfviewoptions/ +--- +**Inheritance:** +java.lang.Object, [com.groupdocs.viewer.options.BaseViewOptions](../../com.groupdocs.viewer.options/baseviewoptions), [com.groupdocs.viewer.options.ViewOptions](../../com.groupdocs.viewer.options/viewoptions) +``` +public class PdfViewOptions extends ViewOptions +``` + +Provides options for rendering documents into PDF format. + +The PdfViewOptions class encapsulates additional settings and parameters that can be used to control the rendering of documents into PDF format in the GroupDocs.Viewer component. + +Example usage: + +``` + + PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setImageHeight(256); + pdfViewOptions.setImageWidth(128); + pdfViewOptions.setDefaultFontName("font-name"); + + try (Viewer viewer = new Viewer("document.pdf")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [PdfViewOptions(CreateFileStream createFileStream)](#PdfViewOptions-com.groupdocs.viewer.interfaces.CreateFileStream-) | Initializes a new instance of the PdfViewOptions class. | +| [PdfViewOptions(CreateFileStream createFileStream, ReleaseFileStream releaseFileStream)](#PdfViewOptions-com.groupdocs.viewer.interfaces.CreateFileStream-com.groupdocs.viewer.interfaces.ReleaseFileStream-) | Initializes a new instance of the PdfViewOptions class. | +| [PdfViewOptions(FileStreamFactory fileStreamFactory)](#PdfViewOptions-com.groupdocs.viewer.interfaces.FileStreamFactory-) | Initializes a new instance of the PdfViewOptions class. | +| [PdfViewOptions()](#PdfViewOptions--) | Initializes a new instance of the PdfViewOptions class with default settings. | +| [PdfViewOptions(String outputFilePath)](#PdfViewOptions-java.lang.String-) | Initializes a new instance of the PdfViewOptions class. | +| [PdfViewOptions(Path outputFilePath)](#PdfViewOptions-java.nio.file.Path-) | Initializes a new instance of the PdfViewOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [getJpgQuality()](#getJpgQuality--) | Retrieves the quality of the JPG images contained by the output PDF document. | +| [setJpgQuality(int value)](#setJpgQuality-int-) | Sets the quality of the JPG images contained by the output PDF document. | +| [getImageMaxWidth()](#getImageMaxWidth--) | Retrieves the maximum width of an output image in pixels. | +| [setImageMaxWidth(int imageMaxWidth)](#setImageMaxWidth-int-) | Sets the maximum width of an output image in pixels. | +| [getImageMaxHeight()](#getImageMaxHeight--) | Retrieves the maximum height of an output image in pixels. | +| [setImageMaxHeight(int imageMaxHeight)](#setImageMaxHeight-int-) | Sets the maximum height of an output image in pixels. | +| [getImageWidth()](#getImageWidth--) | Retrieves the width of the output image in pixels. | +| [setImageWidth(int imageWidth)](#setImageWidth-int-) | Sets the width of the output image in pixels. | +| [getImageHeight()](#getImageHeight--) | Retrieves the height of the output image in pixels. | +| [setImageHeight(int imageHeight)](#setImageHeight-int-) | Sets the height of the output image in pixels. | +| [getSecurity()](#getSecurity--) | Retrieves the security options for the output PDF document. | +| [setSecurity(Security value)](#setSecurity-com.groupdocs.viewer.options.Security-) | Sets the security options for the output PDF document. | +| [isOptimize()](#isOptimize--) | Reduce output file size by excluding common fonts like Times New Roman and Arial, and applying other optimization techniques. | +| [setOptimize(boolean optimize)](#setOptimize-boolean-) | Reduce output file size by excluding common fonts like Times New Roman and Arial, and applying other optimization techniques. | +| [getDocumentSavingCallback()](#getDocumentSavingCallback--) | Retrieves the callback used to estimate the progress of saving a Words or Email document. | +| [setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback)](#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-) | Sets the callback used to estimate the progress of saving a Words or Email document. | +### PdfViewOptions(CreateFileStream createFileStream) {#PdfViewOptions-com.groupdocs.viewer.interfaces.CreateFileStream-} +``` +public PdfViewOptions(CreateFileStream createFileStream) +``` + + +Initializes a new instance of the PdfViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createFileStream | [CreateFileStream](../../com.groupdocs.viewer.interfaces/createfilestream) | | + +### PdfViewOptions(CreateFileStream createFileStream, ReleaseFileStream releaseFileStream) {#PdfViewOptions-com.groupdocs.viewer.interfaces.CreateFileStream-com.groupdocs.viewer.interfaces.ReleaseFileStream-} +``` +public PdfViewOptions(CreateFileStream createFileStream, ReleaseFileStream releaseFileStream) +``` + + +Initializes a new instance of the PdfViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createFileStream | [CreateFileStream](../../com.groupdocs.viewer.interfaces/createfilestream) | The method used to instantiate the stream for writing the output file data. | +| releaseFileStream | [ReleaseFileStream](../../com.groupdocs.viewer.interfaces/releasefilestream) | The method used to release the stream created by the createFileStream method. | + +### PdfViewOptions(FileStreamFactory fileStreamFactory) {#PdfViewOptions-com.groupdocs.viewer.interfaces.FileStreamFactory-} +``` +public PdfViewOptions(FileStreamFactory fileStreamFactory) +``` + + +Initializes a new instance of the PdfViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStreamFactory | [FileStreamFactory](../../com.groupdocs.viewer.interfaces/filestreamfactory) | The factory that implements methods for creating and releasing the output file stream. | + +### PdfViewOptions() {#PdfViewOptions--} +``` +public PdfViewOptions() +``` + + +Initializes a new instance of the PdfViewOptions class with default settings. + +This constructor creates a new PdfViewOptions object with "output.pdf" as the file path format for the output file. The output file will be placed into the current working directory of the application. + +### PdfViewOptions(String outputFilePath) {#PdfViewOptions-java.lang.String-} +``` +public PdfViewOptions(String outputFilePath) +``` + + +Initializes a new instance of the PdfViewOptions class. + +This constructor creates a new PdfViewOptions object with the specified outputFilePath parameter representing the path for the output PDF file. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| outputFilePath | java.lang.String | The path for the output PDF file. | + +### PdfViewOptions(Path outputFilePath) {#PdfViewOptions-java.nio.file.Path-} +``` +public PdfViewOptions(Path outputFilePath) +``` + + +Initializes a new instance of the PdfViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| outputFilePath | java.nio.file.Path | The path for the output PDF file. | + +### getJpgQuality() {#getJpgQuality--} +``` +public final int getJpgQuality() +``` + + +Retrieves the quality of the JPG images contained by the output PDF document. The JPG quality determines the level of compression applied to the images in the PDF document. + +***Note:** Valid values range from 1 to 100, where 1 represents the lowest quality and 100 represents the highest quality.* + +**Returns:** +int - the quality of the JPG images in the output PDF document. +### setJpgQuality(int value) {#setJpgQuality-int-} +``` +public final void setJpgQuality(int value) +``` + + +Sets the quality of the JPG images contained by the output PDF document. The JPG quality determines the level of compression applied to the images in the PDF document. + +***Note:** Valid values range from 1 to 100, where 1 represents the lowest quality and 100 represents the highest quality.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The quality of the JPG images in the output PDF document. | + +### getImageMaxWidth() {#getImageMaxWidth--} +``` +public int getImageMaxWidth() +``` + + +Retrieves the maximum width of an output image in pixels. This parameter applies only when converting a single image to HTML. + +**Returns:** +int - the maximum width of the output image in pixels. +### setImageMaxWidth(int imageMaxWidth) {#setImageMaxWidth-int-} +``` +public void setImageMaxWidth(int imageMaxWidth) +``` + + +Sets the maximum width of an output image in pixels. This parameter applies only when converting a single image to HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageMaxWidth | int | The maximum width of the output image in pixels. | + +### getImageMaxHeight() {#getImageMaxHeight--} +``` +public int getImageMaxHeight() +``` + + +Retrieves the maximum height of an output image in pixels. This parameter applies only when converting a single image to HTML. + +**Returns:** +int - the maximum height of the output image in pixels. +### setImageMaxHeight(int imageMaxHeight) {#setImageMaxHeight-int-} +``` +public void setImageMaxHeight(int imageMaxHeight) +``` + + +Sets the maximum height of an output image in pixels. This parameter applies only when converting a single image to HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageMaxHeight | int | The maximum height of the output image in pixels. | + +### getImageWidth() {#getImageWidth--} +``` +public int getImageWidth() +``` + + +Retrieves the width of the output image in pixels. This parameter applies only when converting a single image to HTML. + +**Returns:** +int - the width of the output image in pixels. +### setImageWidth(int imageWidth) {#setImageWidth-int-} +``` +public void setImageWidth(int imageWidth) +``` + + +Sets the width of the output image in pixels. This parameter applies only when converting a single image to HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageWidth | int | The width of the output image in pixels. | + +### getImageHeight() {#getImageHeight--} +``` +public int getImageHeight() +``` + + +Retrieves the height of the output image in pixels. This parameter applies only when converting a single image to HTML. + +**Returns:** +int - the height of the output image in pixels. +### setImageHeight(int imageHeight) {#setImageHeight-int-} +``` +public void setImageHeight(int imageHeight) +``` + + +Sets the height of the output image in pixels. This parameter applies only when converting a single image to HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| imageHeight | int | The height of the output image in pixels. | + +### getSecurity() {#getSecurity--} +``` +public final Security getSecurity() +``` + + +Retrieves the security options for the output PDF document. + +**Returns:** +[Security](../../com.groupdocs.viewer.options/security) - the security options for the output PDF document. +### setSecurity(Security value) {#setSecurity-com.groupdocs.viewer.options.Security-} +``` +public final void setSecurity(Security value) +``` + + +Sets the security options for the output PDF document. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [Security](../../com.groupdocs.viewer.options/security) | The security options for the output PDF document. | + +### isOptimize() {#isOptimize--} +``` +public boolean isOptimize() +``` + + +Reduce output file size by excluding common fonts like Times New Roman and Arial, and applying other optimization techniques. + +In version 24.2 this option is supported for [Spreadsheet file formats][] only. + +Learn more how to export Excel and Apple Numbers spreadsheets to PDF + + * [Render spreadsheets as PDF][] + +**Example:** + +``` +try (Viewer viewer = new Viewer("employees.xlsx")) { + PdfViewOptions viewOptions = new PdfViewOptions(); + viewOptions.setOptimize(true); + + viewer.view(viewOptions); + } +``` + + +[Spreadsheet file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#spreadsheet-file-formats +[Render spreadsheets as PDF]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/#render-spreadsheets-as-pdf + +**Returns:** +boolean +### setOptimize(boolean optimize) {#setOptimize-boolean-} +``` +public void setOptimize(boolean optimize) +``` + + +Reduce output file size by excluding common fonts like Times New Roman and Arial, and applying other optimization techniques. + +In version 24.2 this option is supported for [Spreadsheet file formats][] only. + +Learn more how to export Excel and Apple Numbers spreadsheets to PDF + + * [Render spreadsheets as PDF][] + +**Example:** + +``` +try (Viewer viewer = new Viewer("employees.xlsx")) { + PdfViewOptions viewOptions = new PdfViewOptions(); + viewOptions.setOptimize(true); + + viewer.view(viewOptions); + } +``` + + +[Spreadsheet file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#spreadsheet-file-formats +[Render spreadsheets as PDF]: https://docs.groupdocs.com/viewer/java/render-excel-and-apple-numbers-spreadsheets/#render-spreadsheets-as-pdf + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| optimize | boolean | | + +### getDocumentSavingCallback() {#getDocumentSavingCallback--} +``` +public IDocumentSavingCallback getDocumentSavingCallback() +``` + + +Retrieves the callback used to estimate the progress of saving a Words or Email document. + +**Returns:** +com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback - the callback to estimate the document saving progress. +### setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) {#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-} +``` +public void setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) +``` + + +Sets the callback used to estimate the progress of saving a Words or Email document. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| documentSavingCallback | com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback | The callback to estimate the document saving progress. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/permissions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/permissions/_index.md new file mode 100644 index 00000000..f90aebb0 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/permissions/_index.md @@ -0,0 +1,94 @@ +--- +title: Permissions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Defines PDF document permissions. +type: docs +weight: 23 +url: /nodejs-java/com.groupdocs.viewer.options/permissions/ +--- +**Inheritance:** +java.lang.Object +``` +public class Permissions +``` + +Defines PDF document permissions. + +The Permissions class provides constants that represent different permissions that can be applied to a PDF document in the GroupDocs.Viewer component. These permissions control the actions that can be performed on the PDF document, such as printing, copying text, modifying annotations, and more. + +Example usage: + +``` + + int permissions = Permissions.DENY_PRINTING | Permissions.DENY_MODIFICATION; + final Security security = new Security(); + security.setPermissions(permissions); + final PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setSecurity(security); + + try (Viewer viewer = new Viewer("document.pdf")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Permissions()](#Permissions--) | | +## Fields + +| Field | Description | +| --- | --- | +| [ALLOW_ALL](#ALLOW-ALL) | Allow printing, modification, and data extraction. | +| [DENY_PRINTING](#DENY-PRINTING) | Deny printing. | +| [DENY_MODIFICATION](#DENY-MODIFICATION) | Deny modification of content, filling in forms, and adding or modifying annotations. | +| [DENY_DATA_EXTRACTION](#DENY-DATA-EXTRACTION) | Deny text and graphics extraction. | +| [DENY_ALL](#DENY-ALL) | Deny printing, modification, and data extraction. | +### Permissions() {#Permissions--} +``` +public Permissions() +``` + + +### ALLOW_ALL {#ALLOW-ALL} +``` +public static final int ALLOW_ALL +``` + + +Allow printing, modification, and data extraction. + +### DENY_PRINTING {#DENY-PRINTING} +``` +public static final int DENY_PRINTING +``` + + +Deny printing. + +### DENY_MODIFICATION {#DENY-MODIFICATION} +``` +public static final int DENY_MODIFICATION +``` + + +Deny modification of content, filling in forms, and adding or modifying annotations. + +### DENY_DATA_EXTRACTION {#DENY-DATA-EXTRACTION} +``` +public static final int DENY_DATA_EXTRACTION +``` + + +Deny text and graphics extraction. + +### DENY_ALL {#DENY-ALL} +``` +public static final int DENY_ALL +``` + + +Deny printing, modification, and data extraction. + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/pngviewoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/pngviewoptions/_index.md new file mode 100644 index 00000000..bb4f9b8c --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/pngviewoptions/_index.md @@ -0,0 +1,289 @@ +--- +title: PngViewOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering documents into PNG format. +type: docs +weight: 24 +url: /nodejs-java/com.groupdocs.viewer.options/pngviewoptions/ +--- +**Inheritance:** +java.lang.Object, [com.groupdocs.viewer.options.BaseViewOptions](../../com.groupdocs.viewer.options/baseviewoptions), [com.groupdocs.viewer.options.ViewOptions](../../com.groupdocs.viewer.options/viewoptions) + +**All Implemented Interfaces:** +[com.groupdocs.viewer.options.IMaxSizeOptions](../../com.groupdocs.viewer.options/imaxsizeoptions) +``` +public class PngViewOptions extends ViewOptions implements IMaxSizeOptions +``` + +Provides options for rendering documents into PNG format. + +The PngViewOptions class encapsulates additional settings and parameters that can be used to control the rendering of documents into PNG format in the GroupDocs.Viewer component. + +Example usage: + +``` + + PngViewOptions options = new PngViewOptions(); + options.setHeight(1080); + options.setWidth(1920); + options.setRenderComments(true); + options.setRenderComments(true); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(options); + // Use the viewer object for further operations + } + +``` + +***Note:** The PngViewOptions class implements the IMaxSizeOptions interface to specify the maximum size of the output PNG images.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [PngViewOptions(CreatePageStream createPageStream)](#PngViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-) | Initializes a new instance of the PngViewOptions class. | +| [PngViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream)](#PngViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.ReleasePageStream-) | Initializes a new instance of the PngViewOptions class. | +| [PngViewOptions(PageStreamFactory pageStreamFactory)](#PngViewOptions-com.groupdocs.viewer.interfaces.PageStreamFactory-) | Initializes a new instance of the PngViewOptions class. | +| [PngViewOptions()](#PngViewOptions--) | Initializes new instance of PngViewOptions class. | +| [PngViewOptions(String filePathFormat)](#PngViewOptions-java.lang.String-) | Initializes a new instance of the PngViewOptions class. | +| [PngViewOptions(Path filePathFormat)](#PngViewOptions-java.nio.file.Path-) | Initializes a new instance of the PngViewOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [getMaxWidth()](#getMaxWidth--) | Returns the maximum width of an output image in pixels. | +| [setMaxWidth(int maxWidth)](#setMaxWidth-int-) | Sets the maximum width of an output image in pixels. | +| [getMaxHeight()](#getMaxHeight--) | Returns the maximum height of an output image in pixels. | +| [setMaxHeight(int maxHeight)](#setMaxHeight-int-) | Sets the maximum height of an output image in pixels. | +| [isExtractText()](#isExtractText--) | Determines whether text extraction is enabled. | +| [setExtractText(boolean value)](#setExtractText-boolean-) | Enables or disables text extraction. | +| [getWidth()](#getWidth--) | Returns the width of the output image in pixels. | +| [setWidth(int value)](#setWidth-int-) | Sets the width of the output image in pixels. | +| [getHeight()](#getHeight--) | Returns the height of the output image in pixels. | +| [setHeight(int value)](#setHeight-int-) | Sets the height of the output image in pixels. | +| [getDocumentSavingCallback()](#getDocumentSavingCallback--) | Retrieves the callback for estimating the saving progress of a document. | +| [setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback)](#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-) | Sets the callback for estimating the saving progress of a document. | +### PngViewOptions(CreatePageStream createPageStream) {#PngViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-} +``` +public PngViewOptions(CreatePageStream createPageStream) +``` + + +Initializes a new instance of the PngViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates the stream used to write the output page data. | + +### PngViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream) {#PngViewOptions-com.groupdocs.viewer.interfaces.CreatePageStream-com.groupdocs.viewer.interfaces.ReleasePageStream-} +``` +public PngViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream) +``` + + +Initializes a new instance of the PngViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| createPageStream | [CreatePageStream](../../com.groupdocs.viewer.interfaces/createpagestream) | The method that instantiates the stream used to write the output page data. | +| releasePageStream | [ReleasePageStream](../../com.groupdocs.viewer.interfaces/releasepagestream) | The method that releases the stream created by the method assigned to the createPageStream parameter. | + +### PngViewOptions(PageStreamFactory pageStreamFactory) {#PngViewOptions-com.groupdocs.viewer.interfaces.PageStreamFactory-} +``` +public PngViewOptions(PageStreamFactory pageStreamFactory) +``` + + +Initializes a new instance of the PngViewOptions class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageStreamFactory | [PageStreamFactory](../../com.groupdocs.viewer.interfaces/pagestreamfactory) | The factory that implements methods for creating and releasing the output page stream. | + +### PngViewOptions() {#PngViewOptions--} +``` +public PngViewOptions() +``` + + +Initializes new instance of PngViewOptions class. + +This constructor initializes new instance of PngViewOptions with "p\_\{0\}.png" as file path format for the output files. The output files will be placed into current working directory of the application. + +### PngViewOptions(String filePathFormat) {#PngViewOptions-java.lang.String-} +``` +public PngViewOptions(String filePathFormat) +``` + + +Initializes a new instance of the PngViewOptions class. + +For example, if the file path format is 'page\_\{0\}.png', the output files will be named as 'page\_1.png', 'page\_2.png', and so on, based on the page number. + +***Note:** It is important to note that the output files will be placed into the current working directory of the application.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePathFormat | java.lang.String | The file path format, e.g., 'page\_\{0\}.png'. | + +### PngViewOptions(Path filePathFormat) {#PngViewOptions-java.nio.file.Path-} +``` +public PngViewOptions(Path filePathFormat) +``` + + +Initializes a new instance of the PngViewOptions class. + +For example, if the file path format is 'page\_\{0\}.png', the output files will be named as 'page\_1.png', 'page\_2.png', and so on, based on the page number. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePathFormat | java.nio.file.Path | The file path format, e.g., 'page\_\{0\}.png'. | + +### getMaxWidth() {#getMaxWidth--} +``` +public int getMaxWidth() +``` + + +Returns the maximum width of an output image in pixels. + +**Returns:** +int - the maximum width of the output image. +### setMaxWidth(int maxWidth) {#setMaxWidth-int-} +``` +public void setMaxWidth(int maxWidth) +``` + + +Sets the maximum width of an output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxWidth | int | The maximum width of the output image. | + +### getMaxHeight() {#getMaxHeight--} +``` +public int getMaxHeight() +``` + + +Returns the maximum height of an output image in pixels. + +**Returns:** +int - the maximum height of the output image. +### setMaxHeight(int maxHeight) {#setMaxHeight-int-} +``` +public void setMaxHeight(int maxHeight) +``` + + +Sets the maximum height of an output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxHeight | int | The maximum height of the output image. | + +### isExtractText() {#isExtractText--} +``` +public final boolean isExtractText() +``` + + +Determines whether text extraction is enabled. + +This option might be useful when you want to add a selectable text layer over the image. + +**Returns:** +boolean - true if text extraction is enabled, false otherwise. +### setExtractText(boolean value) {#setExtractText-boolean-} +``` +public final void setExtractText(boolean value) +``` + + +Enables or disables text extraction. + +This option might be useful when you want to add a selectable text layer over the image. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable text extraction, false to disable it. | + +### getWidth() {#getWidth--} +``` +public final int getWidth() +``` + + +Returns the width of the output image in pixels. + +**Returns:** +int - the width of the output image. +### setWidth(int value) {#setWidth-int-} +``` +public final void setWidth(int value) +``` + + +Sets the width of the output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The width of the output image. | + +### getHeight() {#getHeight--} +``` +public final int getHeight() +``` + + +Returns the height of the output image in pixels. + +**Returns:** +int - the height of the output image. +### setHeight(int value) {#setHeight-int-} +``` +public final void setHeight(int value) +``` + + +Sets the height of the output image in pixels. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The height of the output image. | + +### getDocumentSavingCallback() {#getDocumentSavingCallback--} +``` +public IDocumentSavingCallback getDocumentSavingCallback() +``` + + +Retrieves the callback for estimating the saving progress of a document. + +**Returns:** +com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback - the callback to estimate the document saving progress. +### setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) {#setDocumentSavingCallback-com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback-} +``` +public void setDocumentSavingCallback(IDocumentSavingCallback documentSavingCallback) +``` + + +Sets the callback for estimating the saving progress of a document. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| documentSavingCallback | com.groupdocs.viewer.domain.documents.converting.tohtml.utils.IDocumentSavingCallback | The callback to estimate the document saving progress. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/position/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/position/_index.md new file mode 100644 index 00000000..98305724 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/position/_index.md @@ -0,0 +1,134 @@ +--- +title: Position +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Defines watermark position. +type: docs +weight: 39 +url: /nodejs-java/com.groupdocs.viewer.options/position/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum Position extends Enum +``` + +Defines watermark position. + +The Position enum represents different positions for a watermark in the GroupDocs.Viewer component. It provides a set of predefined positions that can be used to specify the placement of a watermark on a document or image during the rendering process. + +Example usage: + +``` + + Watermark watermark = new Watermark("Watermark"); + watermark.setPosition(Position.DIAGONAL); + watermark.setColor(java.awt.Color.GREEN); + watermark.setSize(Size.HALF_SIZE); + + PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setWatermark(watermark); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [DIAGONAL](#DIAGONAL) | The diagonal position. | +| [TOP_LEFT](#TOP-LEFT) | The top left position. | +| [TOP_CENTER](#TOP-CENTER) | The top center position. | +| [TOP_RIGHT](#TOP-RIGHT) | The top right position. | +| [BOTTOM_LEFT](#BOTTOM-LEFT) | The bottom left position. | +| [BOTTOM_CENTER](#BOTTOM-CENTER) | The bottom center position. | +| [BOTTOM_RIGHT](#BOTTOM-RIGHT) | The bottom right position. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +### DIAGONAL {#DIAGONAL} +``` +public static final Position DIAGONAL +``` + + +The diagonal position. This position represents a diagonal alignment or placement. + +### TOP_LEFT {#TOP-LEFT} +``` +public static final Position TOP_LEFT +``` + + +The top left position. This position represents the top left corner alignment or placement. + +### TOP_CENTER {#TOP-CENTER} +``` +public static final Position TOP_CENTER +``` + + +The top center position. This position represents the top center alignment or placement. + +### TOP_RIGHT {#TOP-RIGHT} +``` +public static final Position TOP_RIGHT +``` + + +The top right position. This position represents the top right corner alignment or placement. + +### BOTTOM_LEFT {#BOTTOM-LEFT} +``` +public static final Position BOTTOM_LEFT +``` + + +The bottom left position. This position represents the bottom left corner alignment or placement. + +### BOTTOM_CENTER {#BOTTOM-CENTER} +``` +public static final Position BOTTOM_CENTER +``` + + +The bottom center position. This position represents the bottom center alignment or placement. + +### BOTTOM_RIGHT {#BOTTOM-RIGHT} +``` +public static final Position BOTTOM_RIGHT +``` + + +The bottom right position. This position represents the bottom right corner alignment or placement. + +### values() {#values--} +``` +public static Position[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.options.Position[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static Position valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[Position](../../com.groupdocs.viewer.options/position) diff --git a/english/nodejs-java/com.groupdocs.viewer.options/projectmanagementoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/projectmanagementoptions/_index.md new file mode 100644 index 00000000..a4798b2a --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/projectmanagementoptions/_index.md @@ -0,0 +1,158 @@ +--- +title: ProjectManagementOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering project management files. +type: docs +weight: 25 +url: /nodejs-java/com.groupdocs.viewer.options/projectmanagementoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class ProjectManagementOptions +``` + +Provides options for rendering project management files. + +The ProjectManagementOptions class encapsulates various settings and parameters that can be used to control the rendering of project management files (such as Microsoft Project or similar) in the GroupDocs.Viewer component. + +Example usage: + +``` + + PngViewOptions pngViewOptions = new PngViewOptions(); + ProjectManagementOptions projectManagementOptions = pngViewOptions.getProjectManagementOptions(); + projectManagementOptions.setPageSize(PageSize.A4); + projectManagementOptions.setStartDate(new Date(2021, 11, 23)); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pngViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [ProjectManagementOptions()](#ProjectManagementOptions--) | Initializes a new instance of the ProjectManagementOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [getPageSize()](#getPageSize--) | Retrieves the output page size. | +| [setPageSize(PageSize value)](#setPageSize-com.groupdocs.viewer.options.PageSize-) | Sets the output page size. | +| [getTimeUnit()](#getTimeUnit--) | Retrieves the time unit. | +| [setTimeUnit(TimeUnit value)](#setTimeUnit-com.groupdocs.viewer.options.TimeUnit-) | Retrieves the time unit. | +| [getStartDate()](#getStartDate--) | Retrieves the start date of the Gantt Chart View to be included in the output. | +| [setStartDate(Date value)](#setStartDate-java.util.Date-) | Sets the start date of the Gantt Chart View to be included in the output. | +| [getEndDate()](#getEndDate--) | Retrieves the end date of the Gantt Chart View to be included in the output. | +| [setEndDate(Date value)](#setEndDate-java.util.Date-) | Sets the end date of the Gantt Chart View to be included in the output. | +### ProjectManagementOptions() {#ProjectManagementOptions--} +``` +public ProjectManagementOptions() +``` + + +Initializes a new instance of the ProjectManagementOptions class. + +### getPageSize() {#getPageSize--} +``` +public final PageSize getPageSize() +``` + + +Retrieves the output page size. + +**Returns:** +[PageSize](../../com.groupdocs.viewer.options/pagesize) - the output page size. +### setPageSize(PageSize value) {#setPageSize-com.groupdocs.viewer.options.PageSize-} +``` +public final void setPageSize(PageSize value) +``` + + +Sets the output page size. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [PageSize](../../com.groupdocs.viewer.options/pagesize) | The output page size. | + +### getTimeUnit() {#getTimeUnit--} +``` +public final TimeUnit getTimeUnit() +``` + + +Retrieves the time unit. + +**Returns:** +[TimeUnit](../../com.groupdocs.viewer.options/timeunit) - the time unit. +### setTimeUnit(TimeUnit value) {#setTimeUnit-com.groupdocs.viewer.options.TimeUnit-} +``` +public final void setTimeUnit(TimeUnit value) +``` + + +Retrieves the time unit. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [TimeUnit](../../com.groupdocs.viewer.options/timeunit) | The time unit. | + +### getStartDate() {#getStartDate--} +``` +public final Date getStartDate() +``` + + +Retrieves the start date of the Gantt Chart View to be included in the output. + +***Note:** Use this option when you need to render a specific time interval of the project within the Gantt Chart View.* + +**Returns:** +java.util.Date - the start date of the Gantt Chart View. +### setStartDate(Date value) {#setStartDate-java.util.Date-} +``` +public final void setStartDate(Date value) +``` + + +Sets the start date of the Gantt Chart View to be included in the output. + +***Note:** Use this option when you need to render a specific time interval of the project within the Gantt Chart View.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.util.Date | The start date of the Gantt Chart View. | + +### getEndDate() {#getEndDate--} +``` +public final Date getEndDate() +``` + + +Retrieves the end date of the Gantt Chart View to be included in the output. + +***Note:** Use this option when you need to render a specific time interval of the project within the Gantt Chart View.* + +**Returns:** +java.util.Date - the end date of the Gantt Chart View. +### setEndDate(Date value) {#setEndDate-java.util.Date-} +``` +public final void setEndDate(Date value) +``` + + +Sets the end date of the Gantt Chart View to be included in the output. + +***Note:** Use this option when you need to render a specific time interval of the project within the Gantt Chart View.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.util.Date | The end date of the Gantt Chart View. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/rotation/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/rotation/_index.md new file mode 100644 index 00000000..39623b75 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/rotation/_index.md @@ -0,0 +1,95 @@ +--- +title: Rotation +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Defines page rotation in degrees. +type: docs +weight: 40 +url: /nodejs-java/com.groupdocs.viewer.options/rotation/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum Rotation extends Enum +``` + +Defines page rotation in degrees. + +The Rotation enum represents different rotation angles for a page in the GroupDocs.Viewer component. It provides a set of predefined rotation options that can be used to specify the rotation angle for rendering a page in various document viewing or conversion scenarios. + +Example usage: + +``` + + PdfViewOptions pdfViewOptions = new PdfViewOptions(); + + pdfViewOptions.rotatePage(1, Rotation.ON_90_DEGREE); + pdfViewOptions.rotatePage(2, Rotation.ON_180_DEGREE); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [ON_90_DEGREE](#ON-90-DEGREE) | The 90 degree page rotation. | +| [ON_180_DEGREE](#ON-180-DEGREE) | The 180 degree page rotation. | +| [ON_270_DEGREE](#ON-270-DEGREE) | The 270 degree page rotation. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +### ON_90_DEGREE {#ON-90-DEGREE} +``` +public static final Rotation ON_90_DEGREE +``` + + +The 90 degree page rotation. This rotation represents a 90-degree clockwise rotation of the page. + +### ON_180_DEGREE {#ON-180-DEGREE} +``` +public static final Rotation ON_180_DEGREE +``` + + +The 180 degree page rotation. This rotation represents a 180-degree clockwise rotation of the page. + +### ON_270_DEGREE {#ON-270-DEGREE} +``` +public static final Rotation ON_270_DEGREE +``` + + +The 270 degree page rotation. This rotation represents a 270-degree clockwise rotation of the page. + +### values() {#values--} +``` +public static Rotation[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.options.Rotation[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static Rotation valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[Rotation](../../com.groupdocs.viewer.options/rotation) diff --git a/english/nodejs-java/com.groupdocs.viewer.options/security/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/security/_index.md new file mode 100644 index 00000000..cb8ac593 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/security/_index.md @@ -0,0 +1,131 @@ +--- +title: Security +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides PDF document security options. +type: docs +weight: 26 +url: /nodejs-java/com.groupdocs.viewer.options/security/ +--- +**Inheritance:** +java.lang.Object +``` +public class Security +``` + +Provides PDF document security options. + +The Security class encapsulates various settings and options that can be used to apply security measures to a PDF document in the GroupDocs.Viewer component. These options include password protection, permissions, and more. + +Example usage: + +``` + + Security security = new Security(); + security.setDocumentOpenPassword("myPassword"); + security.setPermissions(Permissions.DENY_MODIFICATION); + + final PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setSecurity(security); + + try (Viewer viewer = new Viewer("document.pdf")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Security()](#Security--) | Initializes a new instance of the Security class. | +## Methods + +| Method | Description | +| --- | --- | +| [getDocumentOpenPassword()](#getDocumentOpenPassword--) | Gets the password required to open the PDF document. | +| [setDocumentOpenPassword(String value)](#setDocumentOpenPassword-java.lang.String-) | Sets the password required to open the PDF document. | +| [getPermissionsPassword()](#getPermissionsPassword--) | Gets the password required to change permission settings. | +| [setPermissionsPassword(String value)](#setPermissionsPassword-java.lang.String-) | Sets the password required to change permission settings. | +| [getPermissions()](#getPermissions--) | Gets the PDF document permissions such as printing, modification, and data extraction. | +| [setPermissions(int value)](#setPermissions-int-) | Sets the PDF document permissions such as printing, modification, and data extraction. | +### Security() {#Security--} +``` +public Security() +``` + + +Initializes a new instance of the Security class. + +### getDocumentOpenPassword() {#getDocumentOpenPassword--} +``` +public final String getDocumentOpenPassword() +``` + + +Gets the password required to open the PDF document. + +**Returns:** +java.lang.String - the document open password. +### setDocumentOpenPassword(String value) {#setDocumentOpenPassword-java.lang.String-} +``` +public final void setDocumentOpenPassword(String value) +``` + + +Sets the password required to open the PDF document. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The document open password. | + +### getPermissionsPassword() {#getPermissionsPassword--} +``` +public final String getPermissionsPassword() +``` + + +Gets the password required to change permission settings. + +Using a permissions password, you can restrict printing, modification, and data extraction. + +**Returns:** +java.lang.String - the permissions password. +### setPermissionsPassword(String value) {#setPermissionsPassword-java.lang.String-} +``` +public final void setPermissionsPassword(String value) +``` + + +Sets the password required to change permission settings. + +Using a permissions password, you can restrict printing, modification, and data extraction. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The permissions password. | + +### getPermissions() {#getPermissions--} +``` +public final int getPermissions() +``` + + +Gets the PDF document permissions such as printing, modification, and data extraction. + +**Returns:** +int - the PDF document permissions. +### setPermissions(int value) {#setPermissions-int-} +``` +public final void setPermissions(int value) +``` + + +Sets the PDF document permissions such as printing, modification, and data extraction. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | int | The PDF document permissions. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/size/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/size/_index.md new file mode 100644 index 00000000..8a76f6a1 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/size/_index.md @@ -0,0 +1,100 @@ +--- +title: Size +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Watermark size. +type: docs +weight: 27 +url: /nodejs-java/com.groupdocs.viewer.options/size/ +--- +**Inheritance:** +java.lang.Object +``` +public class Size +``` + +Watermark size. + +The Size class represents the size of a watermark in the GroupDocs.Viewer component. It provides options to specify the dimensions of the watermark, such as width and height. + +Example usage: + +``` + + Watermark watermark = new Watermark("Watermark"); + watermark.setPosition(Position.DIAGONAL); + watermark.setColor(java.awt.Color.GREEN); + watermark.setSize(Size.HALF_SIZE); + + PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setWatermark(watermark); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Size(byte relativeSize)](#Size-byte-) | Initializes a new instance of the Size class. | +## Fields + +| Field | Description | +| --- | --- | +| [FULL_SIZE](#FULL-SIZE) | Represents the maximum size of watermark text that fits the page. | +| [HALF_SIZE](#HALF-SIZE) | Represents half of the maximum size of watermark text that fits the page. | +| [ONE_THIRD](#ONE-THIRD) | Represents one third of the maximum size of watermark text that fits the page. | +## Methods + +| Method | Description | +| --- | --- | +| [getRelativeSize()](#getRelativeSize--) | Returns the watermark text size in percentages in relation to the page width. | +### Size(byte relativeSize) {#Size-byte-} +``` +public Size(byte relativeSize) +``` + + +Initializes a new instance of the Size class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| relativeSize | byte | The size in percentages in relation to the page size. | + +### FULL_SIZE {#FULL-SIZE} +``` +public static final Size FULL_SIZE +``` + + +Represents the maximum size of watermark text that fits the page. + +### HALF_SIZE {#HALF-SIZE} +``` +public static final Size HALF_SIZE +``` + + +Represents half of the maximum size of watermark text that fits the page. + +### ONE_THIRD {#ONE-THIRD} +``` +public static final Size ONE_THIRD +``` + + +Represents one third of the maximum size of watermark text that fits the page. + +### getRelativeSize() {#getRelativeSize--} +``` +public final byte getRelativeSize() +``` + + +Returns the watermark text size in percentages in relation to the page width. + +**Returns:** +byte - the watermark text size in percentages. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md new file mode 100644 index 00000000..9b82b6c5 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md @@ -0,0 +1,490 @@ +--- +title: SpreadsheetOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering spreadsheets. +type: docs +weight: 28 +url: /nodejs-java/com.groupdocs.viewer.options/spreadsheetoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class SpreadsheetOptions +``` + +Provides options for rendering spreadsheets. + +The SpreadsheetOptions class encapsulates various settings and parameters that can be used to control the rendering of spreadsheet files (such as Excel or CSV files) in the GroupDocs.Viewer component. + +Example usage: + +``` + + PngViewOptions pngViewOptions = new PngViewOptions(); + SpreadsheetOptions spreadsheetOptions = pngViewOptions.getSpreadsheetOptions(); + spreadsheetOptions.setRenderHeadings(true); + spreadsheetOptions.setCountColumnsPerPage(24); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pngViewOptions); + // Use the viewer object for further operations + } + +``` +## Methods + +| Method | Description | +| --- | --- | +| [isRenderByPageBreaks()](#isRenderByPageBreaks--) | Determines whether the worksheet should be rendered by page breaks. | +| [setRenderByPageBreaks(boolean renderByPageBreaks)](#setRenderByPageBreaks-boolean-) | Sets whether the worksheet should be rendered by page breaks. | +| [isDetectSeparator()](#isDetectSeparator--) | Detects the separator for CSV/TSV files. | +| [setDetectSeparator(boolean detectSeparator)](#setDetectSeparator-boolean-) | Sets whether to detect the separator for CSV/TSV files. | +| [forOnePagePerSheet()](#forOnePagePerSheet--) | Creates a new instance of SpreadsheetOptions class for rendering one sheet into one page. | +| [forSplitSheetIntoPages(int countRowsPerPage)](#forSplitSheetIntoPages-int-) | Creates a new instance of SpreadsheetOptions class for rendering a sheet into multiple pages. | +| [forSplitSheetIntoPages(int countRowsPerPage, int countColumnsPerPage)](#forSplitSheetIntoPages-int-int-) | Initializes a new instance of the SpreadsheetOptions class for rendering a sheet into pages. | +| [forRenderingPrintArea()](#forRenderingPrintArea--) | Initializes a new instance of the SpreadsheetOptions class for rendering print areas only. | +| [isOnePagePerSheet()](#isOnePagePerSheet--) | Indicates whether one sheet is rendered into one page. | +| [getCountRowsPerPage()](#getCountRowsPerPage--) | Gets the count of rows to include into each page when splitting the worksheet into pages. | +| [getCountColumnsPerPage()](#getCountColumnsPerPage--) | Gets the count of columns to include into each page when splitting the worksheet into pages. | +| [setCountColumnsPerPage(int countColumnsPerPage)](#setCountColumnsPerPage-int-) | Sets the count of columns to include into each page when splitting the worksheet into pages. | +| [isRenderPrintAreaOnly()](#isRenderPrintAreaOnly--) | Indicates whether only the print areas are rendered. | +| [isRenderGridLines()](#isRenderGridLines--) | Enables rendering of grid lines. | +| [setRenderGridLines(boolean value)](#setRenderGridLines-boolean-) | Enables or disables the rendering of grid lines. | +| [isSkipEmptyRows()](#isSkipEmptyRows--) | Indicates whether empty rows should be skipped during rendering. | +| [setSkipEmptyRows(boolean value)](#setSkipEmptyRows-boolean-) | Sets whether empty rows should be skipped during rendering. | +| [isSkipEmptyColumns()](#isSkipEmptyColumns--) | Indicates whether empty columns should be skipped during rendering. | +| [setSkipEmptyColumns(boolean value)](#setSkipEmptyColumns-boolean-) | Sets whether empty columns should be skipped during rendering. | +| [isRenderHiddenRows()](#isRenderHiddenRows--) | Determines whether hidden rows should be rendered. | +| [setRenderHiddenRows(boolean value)](#setRenderHiddenRows-boolean-) | Sets whether hidden rows should be rendered. | +| [isRenderHeadings()](#isRenderHeadings--) | Checks if headings rendering is enabled. | +| [setRenderHeadings(boolean renderHeadings)](#setRenderHeadings-boolean-) | Enables headings rendering. | +| [isRenderHiddenColumns()](#isRenderHiddenColumns--) | Enables hidden columns rendering. | +| [setRenderHiddenColumns(boolean value)](#setRenderHiddenColumns-boolean-) | Enables hidden columns rendering. | +| [getTextOverflowMode()](#getTextOverflowMode--) | Returns the text overflow mode for rendering spreadsheet documents into HTML. | +| [setTextOverflowMode(TextOverflowMode value)](#setTextOverflowMode-com.groupdocs.viewer.options.TextOverflowMode-) | Sets the text overflow mode for rendering spreadsheet documents into HTML. | +| [getLeftMargin()](#getLeftMargin--) | To set left margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [setLeftMargin(double leftMargin)](#setLeftMargin-double-) | To set left margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [getRightMargin()](#getRightMargin--) | To set right margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [setRightMargin(double rightMargin)](#setRightMargin-double-) | To set right margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [getTopMargin()](#getTopMargin--) | To set top margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [setTopMargin(double topMargin)](#setTopMargin-double-) | To set top margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [getBottomMargin()](#getBottomMargin--) | To set bottom margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [setBottomMargin(double bottomMargin)](#setBottomMargin-double-) | To set bottom margin of the worksheet when converting to pdf if less than 0 then default convert value is used | +| [forRenderingByPageBreaks()](#forRenderingByPageBreaks--) | Initializes a new instance of the SpreadsheetOptions class for rendering print areas only. | +### isRenderByPageBreaks() {#isRenderByPageBreaks--} +``` +public boolean isRenderByPageBreaks() +``` + + +Determines whether the worksheet should be rendered by page breaks. + +***Note:** This option controls the rendering behavior of the worksheet, similar to printing a spreadsheet in Excel.* + +**Returns:** +boolean - true if the worksheet should be rendered by page breaks, false otherwise. +### setRenderByPageBreaks(boolean renderByPageBreaks) {#setRenderByPageBreaks-boolean-} +``` +public void setRenderByPageBreaks(boolean renderByPageBreaks) +``` + + +Sets whether the worksheet should be rendered by page breaks. + +***Note:** This option controls the rendering behavior of the worksheet, similar to printing a spreadsheet in Excel.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderByPageBreaks | boolean | true if the worksheet should be rendered by page breaks, false otherwise. | + +### isDetectSeparator() {#isDetectSeparator--} +``` +public boolean isDetectSeparator() +``` + + +Detects the separator for CSV/TSV files. + +**Returns:** +boolean - true if the separator should be automatically detected, false otherwise. +### setDetectSeparator(boolean detectSeparator) {#setDetectSeparator-boolean-} +``` +public void setDetectSeparator(boolean detectSeparator) +``` + + +Sets whether to detect the separator for CSV/TSV files. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| detectSeparator | boolean | true to automatically detect the separator, false otherwise. | + +### forOnePagePerSheet() {#forOnePagePerSheet--} +``` +public static SpreadsheetOptions forOnePagePerSheet() +``` + + +Creates a new instance of SpreadsheetOptions class for rendering one sheet into one page. + +**Returns:** +[SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) - a new instance of SpreadsheetOptions class for rendering one sheet into one page. +### forSplitSheetIntoPages(int countRowsPerPage) {#forSplitSheetIntoPages-int-} +``` +public static SpreadsheetOptions forSplitSheetIntoPages(int countRowsPerPage) +``` + + +Creates a new instance of SpreadsheetOptions class for rendering a sheet into multiple pages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| countRowsPerPage | int | The number of rows to include in each page. | + +**Returns:** +[SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) - a new instance of SpreadsheetOptions for rendering a sheet into pages. +### forSplitSheetIntoPages(int countRowsPerPage, int countColumnsPerPage) {#forSplitSheetIntoPages-int-int-} +``` +public static SpreadsheetOptions forSplitSheetIntoPages(int countRowsPerPage, int countColumnsPerPage) +``` + + +Initializes a new instance of the SpreadsheetOptions class for rendering a sheet into pages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| countRowsPerPage | int | The number of rows to include on each page. | +| countColumnsPerPage | int | The number of columns to include on each page. | + +**Returns:** +[SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) - a new instance of the SpreadsheetOptions class for rendering a sheet into pages. +### forRenderingPrintArea() {#forRenderingPrintArea--} +``` +public static SpreadsheetOptions forRenderingPrintArea() +``` + + +Initializes a new instance of the SpreadsheetOptions class for rendering print areas only. + +**Returns:** +[SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) - a new instance of the SpreadsheetOptions class for rendering print areas only. +### isOnePagePerSheet() {#isOnePagePerSheet--} +``` +public final boolean isOnePagePerSheet() +``` + + +Indicates whether one sheet is rendered into one page. + +**Returns:** +boolean - true if one sheet is rendered into one page; false otherwise. +### getCountRowsPerPage() {#getCountRowsPerPage--} +``` +public final int getCountRowsPerPage() +``` + + +Gets the count of rows to include into each page when splitting the worksheet into pages. + +**Returns:** +int - the count of rows to include into each page. +### getCountColumnsPerPage() {#getCountColumnsPerPage--} +``` +public int getCountColumnsPerPage() +``` + + +Gets the count of columns to include into each page when splitting the worksheet into pages. + +**Returns:** +int - the count of columns to include into each page. +### setCountColumnsPerPage(int countColumnsPerPage) {#setCountColumnsPerPage-int-} +``` +public void setCountColumnsPerPage(int countColumnsPerPage) +``` + + +Sets the count of columns to include into each page when splitting the worksheet into pages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| countColumnsPerPage | int | The count of columns to include into each page. | + +### isRenderPrintAreaOnly() {#isRenderPrintAreaOnly--} +``` +public final boolean isRenderPrintAreaOnly() +``` + + +Indicates whether only the print areas are rendered. + +**Returns:** +boolean - true if only the print areas are rendered, false otherwise. +### isRenderGridLines() {#isRenderGridLines--} +``` +public final boolean isRenderGridLines() +``` + + +Enables rendering of grid lines. + +**Returns:** +boolean - true if grid lines are enabled, false otherwise. +### setRenderGridLines(boolean value) {#setRenderGridLines-boolean-} +``` +public final void setRenderGridLines(boolean value) +``` + + +Enables or disables the rendering of grid lines. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable grid lines rendering, false to disable it. | + +### isSkipEmptyRows() {#isSkipEmptyRows--} +``` +public final boolean isSkipEmptyRows() +``` + + +Indicates whether empty rows should be skipped during rendering. + +**Returns:** +boolean - true if empty rows should be skipped, false otherwise. +### setSkipEmptyRows(boolean value) {#setSkipEmptyRows-boolean-} +``` +public final void setSkipEmptyRows(boolean value) +``` + + +Sets whether empty rows should be skipped during rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to skip empty rows, false otherwise. | + +### isSkipEmptyColumns() {#isSkipEmptyColumns--} +``` +public final boolean isSkipEmptyColumns() +``` + + +Indicates whether empty columns should be skipped during rendering. + +**Returns:** +boolean - true if empty columns are skipped, false otherwise. +### setSkipEmptyColumns(boolean value) {#setSkipEmptyColumns-boolean-} +``` +public final void setSkipEmptyColumns(boolean value) +``` + + +Sets whether empty columns should be skipped during rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to skip empty columns, false otherwise. | + +### isRenderHiddenRows() {#isRenderHiddenRows--} +``` +public final boolean isRenderHiddenRows() +``` + + +Determines whether hidden rows should be rendered. + +**Returns:** +boolean - true if hidden rows should be rendered, false otherwise. +### setRenderHiddenRows(boolean value) {#setRenderHiddenRows-boolean-} +``` +public final void setRenderHiddenRows(boolean value) +``` + + +Sets whether hidden rows should be rendered. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable rendering of hidden rows, false to disable it. | + +### isRenderHeadings() {#isRenderHeadings--} +``` +public boolean isRenderHeadings() +``` + + +Checks if headings rendering is enabled. + +**Returns:** +boolean - true if headings rendering is enabled, false otherwise. +### setRenderHeadings(boolean renderHeadings) {#setRenderHeadings-boolean-} +``` +public void setRenderHeadings(boolean renderHeadings) +``` + + +Enables headings rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderHeadings | boolean | true to enable headings rendering, false to disable. | + +### isRenderHiddenColumns() {#isRenderHiddenColumns--} +``` +public final boolean isRenderHiddenColumns() +``` + + +Enables hidden columns rendering. + +**Returns:** +boolean - true if hidden columns rendering is enabled, false otherwise. +### setRenderHiddenColumns(boolean value) {#setRenderHiddenColumns-boolean-} +``` +public final void setRenderHiddenColumns(boolean value) +``` + + +Enables hidden columns rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable hidden columns rendering, false to disable. | + +### getTextOverflowMode() {#getTextOverflowMode--} +``` +public final TextOverflowMode getTextOverflowMode() +``` + + +Returns the text overflow mode for rendering spreadsheet documents into HTML. + +**Returns:** +[TextOverflowMode](../../com.groupdocs.viewer.options/textoverflowmode) - the text overflow mode. +### setTextOverflowMode(TextOverflowMode value) {#setTextOverflowMode-com.groupdocs.viewer.options.TextOverflowMode-} +``` +public final void setTextOverflowMode(TextOverflowMode value) +``` + + +Sets the text overflow mode for rendering spreadsheet documents into HTML. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [TextOverflowMode](../../com.groupdocs.viewer.options/textoverflowmode) | The text overflow mode to be set. | + +### getLeftMargin() {#getLeftMargin--} +``` +public double getLeftMargin() +``` + + +To set left margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Returns:** +double +### setLeftMargin(double leftMargin) {#setLeftMargin-double-} +``` +public void setLeftMargin(double leftMargin) +``` + + +To set left margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| leftMargin | double | | + +### getRightMargin() {#getRightMargin--} +``` +public double getRightMargin() +``` + + +To set right margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Returns:** +double +### setRightMargin(double rightMargin) {#setRightMargin-double-} +``` +public void setRightMargin(double rightMargin) +``` + + +To set right margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| rightMargin | double | | + +### getTopMargin() {#getTopMargin--} +``` +public double getTopMargin() +``` + + +To set top margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Returns:** +double +### setTopMargin(double topMargin) {#setTopMargin-double-} +``` +public void setTopMargin(double topMargin) +``` + + +To set top margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| topMargin | double | | + +### getBottomMargin() {#getBottomMargin--} +``` +public double getBottomMargin() +``` + + +To set bottom margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Returns:** +double +### setBottomMargin(double bottomMargin) {#setBottomMargin-double-} +``` +public void setBottomMargin(double bottomMargin) +``` + + +To set bottom margin of the worksheet when converting to pdf if less than 0 then default convert value is used + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| bottomMargin | double | | + +### forRenderingByPageBreaks() {#forRenderingByPageBreaks--} +``` +public static SpreadsheetOptions forRenderingByPageBreaks() +``` + + +Initializes a new instance of the SpreadsheetOptions class for rendering print areas only. + +**Returns:** +[SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) - a new instance of SpreadsheetOptions for rendering print areas only. The behavior is similar to printing in Excel, where the worksheet is rendered by page breaks. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/textoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/textoptions/_index.md new file mode 100644 index 00000000..030a5f70 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/textoptions/_index.md @@ -0,0 +1,108 @@ +--- +title: TextOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Text files splitting to pages options. +type: docs +weight: 29 +url: /nodejs-java/com.groupdocs.viewer.options/textoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class TextOptions +``` + +Text files splitting to pages options. + +The TextOptions class provides options for splitting text files into pages in the GroupDocs.Viewer component. It allows you to control how text files are divided into individual pages for rendering and viewing purposes. + +Example usage: + +``` + + PngViewOptions pngViewOptions = new PngViewOptions(); + TextOptions options = pngViewOptions.getTextOptions(); + options.setMaxCharsPerRow(96); + options.setMaxRowsPerPage(48); + + try (Viewer viewer = new Viewer("document.txt")) { + viewer.view(pngViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [TextOptions()](#TextOptions--) | Initializes a new instance of the TextOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [getMaxCharsPerRow()](#getMaxCharsPerRow--) | Gets the maximum number of characters per row on a page. | +| [setMaxCharsPerRow(int maxCharsPerRow)](#setMaxCharsPerRow-int-) | Sets the maximum number of characters per row on a page. | +| [getMaxRowsPerPage()](#getMaxRowsPerPage--) | Gets the maximum number of rows per page. | +| [setMaxRowsPerPage(int maxRowsPerPage)](#setMaxRowsPerPage-int-) | Sets the maximum number of rows per page. | +### TextOptions() {#TextOptions--} +``` +public TextOptions() +``` + + +Initializes a new instance of the TextOptions class. + +### getMaxCharsPerRow() {#getMaxCharsPerRow--} +``` +public int getMaxCharsPerRow() +``` + + +Gets the maximum number of characters per row on a page. + +***Note:** The default value is 85.* + +**Returns:** +int - the maximum number of characters per row on a page. +### setMaxCharsPerRow(int maxCharsPerRow) {#setMaxCharsPerRow-int-} +``` +public void setMaxCharsPerRow(int maxCharsPerRow) +``` + + +Sets the maximum number of characters per row on a page. + +***Note:** The default value is 85.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxCharsPerRow | int | The maximum number of characters per row on a page. | + +### getMaxRowsPerPage() {#getMaxRowsPerPage--} +``` +public int getMaxRowsPerPage() +``` + + +Gets the maximum number of rows per page. + +***Note:** The default value is 55.* + +**Returns:** +int - the maximum number of rows. +### setMaxRowsPerPage(int maxRowsPerPage) {#setMaxRowsPerPage-int-} +``` +public void setMaxRowsPerPage(int maxRowsPerPage) +``` + + +Sets the maximum number of rows per page. + +***Note:** The default value is 55.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxRowsPerPage | int | The maximum number of rows. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/textoverflowmode/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/textoverflowmode/_index.md new file mode 100644 index 00000000..9f125cf6 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/textoverflowmode/_index.md @@ -0,0 +1,104 @@ +--- +title: TextOverflowMode +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Defines text overflow mode for rendering spreadsheet documents into HTML. +type: docs +weight: 41 +url: /nodejs-java/com.groupdocs.viewer.options/textoverflowmode/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum TextOverflowMode extends Enum +``` + +Defines text overflow mode for rendering spreadsheet documents into HTML. + +The TextOverflowMode enum represents different modes for handling text overflow in the GroupDocs.Viewer component. It provides a set of predefined options that can be used to control how text is displayed when it exceeds the available space in cells during the rendering of spreadsheet documents into HTML. + +Example usage: + +``` + + HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources(); + + htmlViewOptions.setSpreadsheetOptions(SpreadsheetOptions.forOnePagePerSheet()); + htmlViewOptions.getSpreadsheetOptions().setTextOverflowMode(TextOverflowMode.HIDE_TEXT); + + try (Viewer viewer = new Viewer("document.xlsx")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [OVERLAY](#OVERLAY) | Overlay next cells even if they are not empty. | +| [OVERLAY_IF_NEXT_IS_EMPTY](#OVERLAY-IF-NEXT-IS-EMPTY) | Overlay next cells only if they are empty. | +| [AUTO_FIT_COLUMN](#AUTO-FIT-COLUMN) | Expand columns to fit the text. | +| [HIDE_TEXT](#HIDE-TEXT) | Hide the overflow text. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +### OVERLAY {#OVERLAY} +``` +public static final TextOverflowMode OVERLAY +``` + + +Overlay next cells even if they are not empty. This mode allows the text to overflow into the adjacent cells, regardless of their content. + +### OVERLAY_IF_NEXT_IS_EMPTY {#OVERLAY-IF-NEXT-IS-EMPTY} +``` +public static final TextOverflowMode OVERLAY_IF_NEXT_IS_EMPTY +``` + + +Overlay next cells only if they are empty. This mode allows the text to overflow into the adjacent cells only if those cells are empty. + +### AUTO_FIT_COLUMN {#AUTO-FIT-COLUMN} +``` +public static final TextOverflowMode AUTO_FIT_COLUMN +``` + + +Expand columns to fit the text. This mode automatically adjusts the width of the columns to accommodate the overflowing text. + +### HIDE_TEXT {#HIDE-TEXT} +``` +public static final TextOverflowMode HIDE_TEXT +``` + + +Hide the overflow text. This mode hides the overflowing text, preventing it from being displayed. + +### values() {#values--} +``` +public static TextOverflowMode[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.options.TextOverflowMode[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static TextOverflowMode valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[TextOverflowMode](../../com.groupdocs.viewer.options/textoverflowmode) diff --git a/english/nodejs-java/com.groupdocs.viewer.options/tile/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/tile/_index.md new file mode 100644 index 00000000..b481efe2 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/tile/_index.md @@ -0,0 +1,126 @@ +--- +title: Tile +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents drawing region. +type: docs +weight: 30 +url: /nodejs-java/com.groupdocs.viewer.options/tile/ +--- +**Inheritance:** +java.lang.Object +``` +public class Tile +``` + +Represents drawing region. + +The Tile class represents a drawing region in the GroupDocs.Viewer component. It is used to define a specific area or region within a document that needs to be rendered or processed separately. + +Example usage: + +``` + + Tile tile = new Tile(100, 100, 200, 200); + + PngViewOptions pngViewOptions = new PngViewOptions(); + pngViewOptions.getCadOptions().setTiles(Arrays.asList(tile)); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pngViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Tile(int startPointX, int startPointY, int width, int height)](#Tile-int-int-int-int-) | Initializes a new instance of the Tile class. | +## Methods + +| Method | Description | +| --- | --- | +| [getStartPointX()](#getStartPointX--) | Gets the X coordinate of the lowest left point on the drawing where the tile begins. | +| [getStartPointY()](#getStartPointY--) | Gets the Y coordinate of the lowest left point on the drawing where the tile begins. | +| [getWidth()](#getWidth--) | Gets the width of the tile in pixels. | +| [getHeight()](#getHeight--) | Gets the height of the tile in pixels. | +| [getEndPointX()](#getEndPointX--) | Returns the X coordinate of the highest right point on the drawing where the tile ends. | +| [getEndPointY()](#getEndPointY--) | Returns the Y coordinate of the highest right point on the drawing where the tile ends. | +### Tile(int startPointX, int startPointY, int width, int height) {#Tile-int-int-int-int-} +``` +public Tile(int startPointX, int startPointY, int width, int height) +``` + + +Initializes a new instance of the Tile class. + +This constructor creates a new tile object with the specified starting point, width, and height. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| startPointX | int | The X coordinate of the lowest left point on the drawing where the tile begins. | +| startPointY | int | The Y coordinate of the lowest left point on the drawing where the tile begins. | +| width | int | The width of the tile in pixels. | +| height | int | The height of the tile in pixels. | + +### getStartPointX() {#getStartPointX--} +``` +public final int getStartPointX() +``` + + +Gets the X coordinate of the lowest left point on the drawing where the tile begins. + +**Returns:** +int - the X coordinate of the lowest left point. +### getStartPointY() {#getStartPointY--} +``` +public final int getStartPointY() +``` + + +Gets the Y coordinate of the lowest left point on the drawing where the tile begins. + +**Returns:** +int - the Y coordinate of the lowest left point. +### getWidth() {#getWidth--} +``` +public final int getWidth() +``` + + +Gets the width of the tile in pixels. + +**Returns:** +int - the width of the tile. +### getHeight() {#getHeight--} +``` +public final int getHeight() +``` + + +Gets the height of the tile in pixels. + +**Returns:** +int - the height of the tile. +### getEndPointX() {#getEndPointX--} +``` +public final int getEndPointX() +``` + + +Returns the X coordinate of the highest right point on the drawing where the tile ends. + +**Returns:** +int - the X coordinate of the highest right point. +### getEndPointY() {#getEndPointY--} +``` +public final int getEndPointY() +``` + + +Returns the Y coordinate of the highest right point on the drawing where the tile ends. + +**Returns:** +int - the Y coordinate of the highest right point. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/timeunit/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/timeunit/_index.md new file mode 100644 index 00000000..3ed1e82f --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/timeunit/_index.md @@ -0,0 +1,103 @@ +--- +title: TimeUnit +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Time unit of the project duration. +type: docs +weight: 42 +url: /nodejs-java/com.groupdocs.viewer.options/timeunit/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum +``` +public enum TimeUnit extends Enum +``` + +Time unit of the project duration. + +The TimeUnit enum represents different time units for specifying the duration of a project in the GroupDocs.Viewer component. It provides a set of predefined time units that can be used to represent and calculate the duration of a project, such as days, months and so on. + +Example usage: + +``` + + HtmlViewOptions pdfViewOptions = HtmlViewOptions.forEmbeddedResources(); + ProjectManagementOptions projectManagementOptions = pdfViewOptions.getProjectManagementOptions(); + projectManagementOptions.setTimeUnit(TimeUnit.MONTHS); + + try (Viewer viewer = new Viewer("document.mpp")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Fields + +| Field | Description | +| --- | --- | +| [UNSPECIFIED](#UNSPECIFIED) | The unknown time scale. | +| [DAYS](#DAYS) | Days time scale. | +| [THIRDS_OF_MONTHS](#THIRDS-OF-MONTHS) | Thirds of months time scale. | +| [MONTHS](#MONTHS) | Months time scale. | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +### UNSPECIFIED {#UNSPECIFIED} +``` +public static final TimeUnit UNSPECIFIED +``` + + +The unknown time scale. This time unit represents an unknown or unspecified time scale. + +### DAYS {#DAYS} +``` +public static final TimeUnit DAYS +``` + + +Days time scale. This time unit represents a one-day interval. + +### THIRDS_OF_MONTHS {#THIRDS-OF-MONTHS} +``` +public static final TimeUnit THIRDS_OF_MONTHS +``` + + +Thirds of months time scale. This time unit represents a one-third of the month interval. + +### MONTHS {#MONTHS} +``` +public static final TimeUnit MONTHS +``` + + +Months time scale. This time unit represents a one-month interval. + +### values() {#values--} +``` +public static TimeUnit[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.options.TimeUnit[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static TimeUnit valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[TimeUnit](../../com.groupdocs.viewer.options/timeunit) diff --git a/english/nodejs-java/com.groupdocs.viewer.options/viewinfooptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/viewinfooptions/_index.md new file mode 100644 index 00000000..d7541e2a --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/viewinfooptions/_index.md @@ -0,0 +1,294 @@ +--- +title: ViewInfoOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options used for retrieving information about view. +type: docs +weight: 31 +url: /nodejs-java/com.groupdocs.viewer.options/viewinfooptions/ +--- +**Inheritance:** +java.lang.Object, [com.groupdocs.viewer.options.BaseViewOptions](../../com.groupdocs.viewer.options/baseviewoptions) + +**All Implemented Interfaces:** +[com.groupdocs.viewer.options.IMaxSizeOptions](../../com.groupdocs.viewer.options/imaxsizeoptions) +``` +public class ViewInfoOptions extends BaseViewOptions implements IMaxSizeOptions +``` + +Provides options used for retrieving information about view. + +The ViewInfoOptions class encapsulates additional settings and parameters that can be used to retrieve information about a view in the GroupDocs.Viewer component. + +Example usage: + +``` + + ViewInfoOptions viewInfoOptions = ViewInfoOptions.forPngView(false); + try (Viewer viewer = new Viewer("document.pdf")) { + ViewInfo viewInfo = viewer.getViewInfo(viewInfoOptions); + // Use the viewInfo object for further operations + } + +``` + +***Note:** The ViewInfoOptions class implements the IMaxSizeOptions interface to provide additional settings and size constraints for view information retrieval.* +## Methods + +| Method | Description | +| --- | --- | +| [isExtractText()](#isExtractText--) | Indicates whether text extraction is enabled. | +| [setExtractText(boolean extractText)](#setExtractText-boolean-) | Sets the flag indicating whether text extraction is enabled. | +| [getMaxWidth()](#getMaxWidth--) | Returns the maximum width of the output image for rendering to PNG/JPG. | +| [setMaxWidth(int maxWidth)](#setMaxWidth-int-) | Sets the maximum width of the output image for rendering to PNG/JPG. | +| [getMaxHeight()](#getMaxHeight--) | Returns the maximum height of the output image for rendering to PNG/JPG. | +| [setMaxHeight(int maxHeight)](#setMaxHeight-int-) | Sets the maximum height of the output image for rendering to PNG/JPG. | +| [getWidth()](#getWidth--) | Returns the width of the image for rendering to PNG/JPG. | +| [setWidth(int width)](#setWidth-int-) | Sets the width of the image for rendering to PNG/JPG. | +| [getHeight()](#getHeight--) | Returns the height of the image for rendering to PNG/JPG. | +| [setHeight(int height)](#setHeight-int-) | Sets the height of the image for rendering to PNG/JPG. | +| [forHtmlView()](#forHtmlView--) | Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into HTML. | +| [forHtmlView(boolean renderSinglePage)](#forHtmlView-boolean-) | Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into HTML. | +| [forJpgView()](#forJpgView--) | Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into JPG. | +| [forJpgView(boolean extractText)](#forJpgView-boolean-) | Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into JPG. | +| [forPngView()](#forPngView--) | Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into PNG. | +| [forPngView(boolean extractText)](#forPngView-boolean-) | Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into PNG. | +| [fromHtmlViewOptions(HtmlViewOptions options)](#fromHtmlViewOptions-com.groupdocs.viewer.options.HtmlViewOptions-) | Initializes a new instance of the ViewInfoOptions class based on the [HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) object. | +| [fromPngViewOptions(PngViewOptions options)](#fromPngViewOptions-com.groupdocs.viewer.options.PngViewOptions-) | Initializes a new instance of the ViewInfoOptions class based on the [PngViewOptions](../../com.groupdocs.viewer.options/pngviewoptions) object. | +| [fromJpgViewOptions(JpgViewOptions options)](#fromJpgViewOptions-com.groupdocs.viewer.options.JpgViewOptions-) | Initializes a new instance of the ViewInfoOptions class based on the [JpgViewOptions](../../com.groupdocs.viewer.options/jpgviewoptions) object. | +### isExtractText() {#isExtractText--} +``` +public boolean isExtractText() +``` + + +Indicates whether text extraction is enabled. + +**Returns:** +boolean - True if text extraction is enabled, false otherwise. +### setExtractText(boolean extractText) {#setExtractText-boolean-} +``` +public void setExtractText(boolean extractText) +``` + + +Sets the flag indicating whether text extraction is enabled. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| extractText | boolean | True to enable text extraction, false to disable. | + +### getMaxWidth() {#getMaxWidth--} +``` +public int getMaxWidth() +``` + + +Returns the maximum width of the output image for rendering to PNG/JPG. + +**Returns:** +int - the maximum width of the output image. +### setMaxWidth(int maxWidth) {#setMaxWidth-int-} +``` +public void setMaxWidth(int maxWidth) +``` + + +Sets the maximum width of the output image for rendering to PNG/JPG. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxWidth | int | The maximum width of the output image. | + +### getMaxHeight() {#getMaxHeight--} +``` +public int getMaxHeight() +``` + + +Returns the maximum height of the output image for rendering to PNG/JPG. + +**Returns:** +int - the maximum height of the output image. +### setMaxHeight(int maxHeight) {#setMaxHeight-int-} +``` +public void setMaxHeight(int maxHeight) +``` + + +Sets the maximum height of the output image for rendering to PNG/JPG. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| maxHeight | int | The maximum height of the output image. | + +### getWidth() {#getWidth--} +``` +public int getWidth() +``` + + +Returns the width of the image for rendering to PNG/JPG. + +**Returns:** +int - the width of the image. +### setWidth(int width) {#setWidth-int-} +``` +public void setWidth(int width) +``` + + +Sets the width of the image for rendering to PNG/JPG. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| width | int | The width of the image. | + +### getHeight() {#getHeight--} +``` +public int getHeight() +``` + + +Returns the height of the image for rendering to PNG/JPG. + +**Returns:** +int - the height of the image. +### setHeight(int height) {#setHeight-int-} +``` +public void setHeight(int height) +``` + + +Sets the height of the image for rendering to PNG/JPG. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| height | int | The height of the image. | + +### forHtmlView() {#forHtmlView--} +``` +public static ViewInfoOptions forHtmlView() +``` + + +Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into HTML. + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of the ViewInfoOptions class. +### forHtmlView(boolean renderSinglePage) {#forHtmlView-boolean-} +``` +public static ViewInfoOptions forHtmlView(boolean renderSinglePage) +``` + + +Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into HTML. + +***Note:** By default, HTML content will be rendered on multiple pages.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderSinglePage | boolean | Enables HTML content to be rendered on a single page. | + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. +### forJpgView() {#forJpgView--} +``` +public static ViewInfoOptions forJpgView() +``` + + +Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into JPG. + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. +### forJpgView(boolean extractText) {#forJpgView-boolean-} +``` +public static ViewInfoOptions forJpgView(boolean extractText) +``` + + +Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into JPG. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| extractText | boolean | Enables text extraction. | + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. +### forPngView() {#forPngView--} +``` +public static ViewInfoOptions forPngView() +``` + + +Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into PNG. + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. +### forPngView(boolean extractText) {#forPngView-boolean-} +``` +public static ViewInfoOptions forPngView(boolean extractText) +``` + + +Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into PNG. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| extractText | boolean | Enables text extraction. | + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. +### fromHtmlViewOptions(HtmlViewOptions options) {#fromHtmlViewOptions-com.groupdocs.viewer.options.HtmlViewOptions-} +``` +public static ViewInfoOptions fromHtmlViewOptions(HtmlViewOptions options) +``` + + +Initializes a new instance of the ViewInfoOptions class based on the [HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| options | [HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions) | The HTML view options. | + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. +### fromPngViewOptions(PngViewOptions options) {#fromPngViewOptions-com.groupdocs.viewer.options.PngViewOptions-} +``` +public static ViewInfoOptions fromPngViewOptions(PngViewOptions options) +``` + + +Initializes a new instance of the ViewInfoOptions class based on the [PngViewOptions](../../com.groupdocs.viewer.options/pngviewoptions) object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| options | [PngViewOptions](../../com.groupdocs.viewer.options/pngviewoptions) | The PNG view options. | + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. +### fromJpgViewOptions(JpgViewOptions options) {#fromJpgViewOptions-com.groupdocs.viewer.options.JpgViewOptions-} +``` +public static ViewInfoOptions fromJpgViewOptions(JpgViewOptions options) +``` + + +Initializes a new instance of the ViewInfoOptions class based on the [JpgViewOptions](../../com.groupdocs.viewer.options/jpgviewoptions) object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| options | [JpgViewOptions](../../com.groupdocs.viewer.options/jpgviewoptions) | The JPG view options. | + +**Returns:** +[ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) - New instance of ViewInfoOptions class. diff --git a/english/nodejs-java/com.groupdocs.viewer.options/viewoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/viewoptions/_index.md new file mode 100644 index 00000000..9e9697c3 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/viewoptions/_index.md @@ -0,0 +1,102 @@ +--- +title: ViewOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides rendering options. +type: docs +weight: 32 +url: /nodejs-java/com.groupdocs.viewer.options/viewoptions/ +--- +**Inheritance:** +java.lang.Object, [com.groupdocs.viewer.options.BaseViewOptions](../../com.groupdocs.viewer.options/baseviewoptions) +``` +public abstract class ViewOptions extends BaseViewOptions +``` + +Provides rendering options. + +The ViewOptions class extends the BaseViewOptions class and serves as a base class for rendering options in the GroupDocs.Viewer component. It encapsulates common settings and parameters that can be used for rendering various types of documents into different formats. + +***Note:** The ViewOptions class should not be used directly, use [HtmlViewOptions](../../com.groupdocs.viewer.options/htmlviewoptions), [PdfViewOptions](../../com.groupdocs.viewer.options/pdfviewoptions), [PngViewOptions](../../com.groupdocs.viewer.options/pngviewoptions) and so on instead.* +## Constructors + +| Constructor | Description | +| --- | --- | +| [ViewOptions()](#ViewOptions--) | | +## Methods + +| Method | Description | +| --- | --- | +| [getWatermark()](#getWatermark--) | Gets the text watermark applied to each page. | +| [setWatermark(Watermark value)](#setWatermark-com.groupdocs.viewer.options.Watermark-) | Sets the text watermark to be applied to each page. | +| [rotatePage(int pageNumber, Rotation rotation)](#rotatePage-int-com.groupdocs.viewer.options.Rotation-) | Applies a clockwise rotation to the specified page. | +| [getPageRotations()](#getPageRotations--) | Retrieves the page rotations. | +| [isPageRotationsInitialized_Internal()](#isPageRotationsInitialized-Internal--) | To prevent creating the instance just to check that it is empty | +### ViewOptions() {#ViewOptions--} +``` +public ViewOptions() +``` + + +### getWatermark() {#getWatermark--} +``` +public final Watermark getWatermark() +``` + + +Gets the text watermark applied to each page. + +In case both \#setWatermark(Watermark).setWatermark(Watermark) and \#getPageRotations().getPageRotations() are specified, the watermark will be applied to the rotated pages. + +**Returns:** +[Watermark](../../com.groupdocs.viewer.options/watermark) - the text watermark applied to each page. +### setWatermark(Watermark value) {#setWatermark-com.groupdocs.viewer.options.Watermark-} +``` +public final void setWatermark(Watermark value) +``` + + +Sets the text watermark to be applied to each page. + +In case both ViewOptions.Watermark and \#getPageRotations().getPageRotations() are specified, the watermark will be applied to the rotated pages. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [Watermark](../../com.groupdocs.viewer.options/watermark) | The text watermark to be set. | + +### rotatePage(int pageNumber, Rotation rotation) {#rotatePage-int-com.groupdocs.viewer.options.Rotation-} +``` +public final void rotatePage(int pageNumber, Rotation rotation) +``` + + +Applies a clockwise rotation to the specified page. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageNumber | int | The page number. | +| rotation | [Rotation](../../com.groupdocs.viewer.options/rotation) | The rotation value. | + +### getPageRotations() {#getPageRotations--} +``` +public Map getPageRotations() +``` + + +Retrieves the page rotations. + +If both [setWatermark(Watermark)](../../com.groupdocs.viewer.options/viewoptions\#setWatermark-Watermark-) and getPageRotations() are specified, the watermark will be applied to the rotated pages. + +**Returns:** +java.util.Map - a map containing the page numbers as keys and their corresponding rotations as values. +### isPageRotationsInitialized_Internal() {#isPageRotationsInitialized-Internal--} +``` +public boolean isPageRotationsInitialized_Internal() +``` + + +To prevent creating the instance just to check that it is empty + +**Returns:** +boolean diff --git a/english/nodejs-java/com.groupdocs.viewer.options/visiorenderingoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/visiorenderingoptions/_index.md new file mode 100644 index 00000000..26c722dd --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/visiorenderingoptions/_index.md @@ -0,0 +1,101 @@ +--- +title: VisioRenderingOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The Visio files processing documents view options. +type: docs +weight: 33 +url: /nodejs-java/com.groupdocs.viewer.options/visiorenderingoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class VisioRenderingOptions +``` + +The Visio files processing documents view options. + +The VisioRenderingOptions class provides options for processing and rendering Visio files in the GroupDocs.Viewer component. It encapsulates settings and parameters that can be used to control the rendering process and output format for Visio documents. + +Example usage: + +``` + + PngViewOptions pngViewOptions = new PngViewOptions(); + VisioRenderingOptions visioRenderingOptions = pngViewOptions.getVisioRenderingOptions(); + visioRenderingOptions.setRenderFiguresOnly(true); + + try (Viewer viewer = new Viewer(visioDocument)) { + viewer.view(pngViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [VisioRenderingOptions()](#VisioRenderingOptions--) | Initializes a new instance of the VisioRenderingOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [isRenderFiguresOnly()](#isRenderFiguresOnly--) | Render only Visio figures, excluding the diagram. | +| [setRenderFiguresOnly(boolean renderFiguresOnly)](#setRenderFiguresOnly-boolean-) | Sets the flag to render only Visio figures, excluding the diagram. | +| [getFigureWidth()](#getFigureWidth--) | Retrieves the width of the figure. | +| [setFigureWidth(int figureWidth)](#setFigureWidth-int-) | Sets the width of the figure. | +### VisioRenderingOptions() {#VisioRenderingOptions--} +``` +public VisioRenderingOptions() +``` + + +Initializes a new instance of the VisioRenderingOptions class. + +### isRenderFiguresOnly() {#isRenderFiguresOnly--} +``` +public boolean isRenderFiguresOnly() +``` + + +Render only Visio figures, excluding the diagram. + +**Returns:** +boolean - true if only Visio figures should be rendered, false otherwise. +### setRenderFiguresOnly(boolean renderFiguresOnly) {#setRenderFiguresOnly-boolean-} +``` +public void setRenderFiguresOnly(boolean renderFiguresOnly) +``` + + +Sets the flag to render only Visio figures, excluding the diagram. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderFiguresOnly | boolean | true to render only Visio figures, false to include the diagram. | + +### getFigureWidth() {#getFigureWidth--} +``` +public int getFigureWidth() +``` + + +Retrieves the width of the figure. The height will be calculated automatically. + +**Returns:** +int - the width of the figure. +### setFigureWidth(int figureWidth) {#setFigureWidth-int-} +``` +public void setFigureWidth(int figureWidth) +``` + + +Sets the width of the figure. The height will be calculated automatically. + +***Note:** Default value is 100.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| figureWidth | int | The width of the figure. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/watermark/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/watermark/_index.md new file mode 100644 index 00000000..9cefe628 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/watermark/_index.md @@ -0,0 +1,210 @@ +--- +title: Watermark +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents text watermark. +type: docs +weight: 34 +url: /nodejs-java/com.groupdocs.viewer.options/watermark/ +--- +**Inheritance:** +java.lang.Object +``` +public class Watermark +``` + +Represents text watermark. + +The Watermark class represents a text watermark in the GroupDocs.Viewer component. It is used to define and apply a watermark to the rendered output of documents. + +Example usage: + +``` + + Watermark watermark = new Watermark("Watermark"); + watermark.setPosition(Position.DIAGONAL); + watermark.setColor(java.awt.Color.GREEN); + watermark.setSize(Size.HALF_SIZE); + + PdfViewOptions pdfViewOptions = new PdfViewOptions(); + pdfViewOptions.setWatermark(watermark); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pdfViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Watermark(String text)](#Watermark-java.lang.String-) | Initializes a new instance of the Watermark class. | +## Methods + +| Method | Description | +| --- | --- | +| [getText()](#getText--) | Returns the watermark text. | +| [getColor()](#getColor--) | Returns the watermark color. | +| [getColorAsHex()](#getColorAsHex--) | Returns the watermark color in hex format. | +| [setColor(Color value)](#setColor-java.awt.Color-) | Sets the watermark color. | +| [setColor(String colorName)](#setColor-java.lang.String-) | Sets the watermark color. | +| [getPosition()](#getPosition--) | Returns the watermark position. | +| [setPosition(Position value)](#setPosition-com.groupdocs.viewer.options.Position-) | Sets the watermark position. | +| [getSize()](#getSize--) | Returns the watermark size. | +| [setSize(Size value)](#setSize-com.groupdocs.viewer.options.Size-) | Sets the watermark size. | +| [getFontName()](#getFontName--) | Returns the font name used for the watermark. | +| [setFontName(String value)](#setFontName-java.lang.String-) | Sets the font name used for the watermark. | +### Watermark(String text) {#Watermark-java.lang.String-} +``` +public Watermark(String text) +``` + + +Initializes a new instance of the Watermark class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| text | java.lang.String | The watermark text. | + +### getText() {#getText--} +``` +public final String getText() +``` + + +Returns the watermark text. This method retrieves the text of the watermark applied to the document. + +**Returns:** +java.lang.String - the watermark text. +### getColor() {#getColor--} +``` +public final Color getColor() +``` + + +Returns the watermark color. This method retrieves the color of the watermark applied to the document. + +***Note:** The default value is the red color obtained from Color\#getRed().getRed().* + +**Returns:** +java.awt.Color - the watermark color. +### getColorAsHex() {#getColorAsHex--} +``` +public final String getColorAsHex() +``` + + +Returns the watermark color in hex format. This method retrieves the color of the watermark applied to the document. + +***Note:** The default value is the red color obtained from Color\#getRed().getRed().* + +**Returns:** +java.lang.String - the watermark color in hex format. +### setColor(Color value) {#setColor-java.awt.Color-} +``` +public final void setColor(Color value) +``` + + +Sets the watermark color. This method sets the color of the watermark applied to the document. + +***Note:** The default value is obtained from Color\#getRed().getRed().* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.awt.Color | The watermark color to set. | + +### setColor(String colorName) {#setColor-java.lang.String-} +``` +public final void setColor(String colorName) +``` + + +Sets the watermark color. This method sets the color of the watermark applied to the document. + +***Note:** The default value is obtained from Color\#getRed().getRed().* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| colorName | java.lang.String | The watermark color to set. | + +### getPosition() {#getPosition--} +``` +public final Position getPosition() +``` + + +Returns the watermark position. This method returns the position of the watermark applied to the document. + +***Note:** The default value is [Position.DIAGONAL](../../com.groupdocs.viewer.options/position\#DIAGONAL).* + +**Returns:** +[Position](../../com.groupdocs.viewer.options/position) - the watermark position. +### setPosition(Position value) {#setPosition-com.groupdocs.viewer.options.Position-} +``` +public final void setPosition(Position value) +``` + + +Sets the watermark position. This method sets the position of the watermark applied to the document. + +***Note:** The default value is [Position.DIAGONAL](../../com.groupdocs.viewer.options/position\#DIAGONAL).* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [Position](../../com.groupdocs.viewer.options/position) | The watermark position. | + +### getSize() {#getSize--} +``` +public final Size getSize() +``` + + +Returns the watermark size. This method retrieves the size of the watermark applied to the document. + +***Note:** The default value is [Size.FULL\_SIZE](../../com.groupdocs.viewer.options/size\#FULL-SIZE).* + +**Returns:** +[Size](../../com.groupdocs.viewer.options/size) - the watermark size. +### setSize(Size value) {#setSize-com.groupdocs.viewer.options.Size-} +``` +public final void setSize(Size value) +``` + + +Sets the watermark size. This method sets the size of the watermark to be applied to the document. + +***Note:** The default value is [Size.FULL\_SIZE](../../com.groupdocs.viewer.options/size\#FULL-SIZE).* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | [Size](../../com.groupdocs.viewer.options/size) | The watermark size. | + +### getFontName() {#getFontName--} +``` +public final String getFontName() +``` + + +Returns the font name used for the watermark. + +**Returns:** +java.lang.String - the font name used for the watermark. +### setFontName(String value) {#setFontName-java.lang.String-} +``` +public final void setFontName(String value) +``` + + +Sets the font name used for the watermark. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | java.lang.String | The font name used for the watermark. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.options/wordprocessingoptions/_index.md b/english/nodejs-java/com.groupdocs.viewer.options/wordprocessingoptions/_index.md new file mode 100644 index 00000000..21f470fe --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.options/wordprocessingoptions/_index.md @@ -0,0 +1,318 @@ +--- +title: WordProcessingOptions +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides options for rendering word processing documents. +type: docs +weight: 35 +url: /nodejs-java/com.groupdocs.viewer.options/wordprocessingoptions/ +--- +**Inheritance:** +java.lang.Object +``` +public class WordProcessingOptions +``` + +Provides options for rendering word processing documents. + +The WordProcessingOptions class provides options for rendering word processing documents in the GroupDocs.Viewer component. It encapsulates settings and parameters that can be used to control the rendering process and output format for word processing files. + +Example usage: + +``` + + PngViewOptions pngViewOptions = new PngViewOptions(); + WordProcessingOptions wordProcessingOptions = pngViewOptions.getWordProcessingOptions(); + wordProcessingOptions.setRenderTrackedChanges(true); + wordProcessingOptions.setLeftMargin(32f); + + try (Viewer viewer = new Viewer("document.docx")) { + viewer.view(pngViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [WordProcessingOptions()](#WordProcessingOptions--) | Initializes a new instance of the WordProcessingOptions class. | +## Methods + +| Method | Description | +| --- | --- | +| [getPageSize()](#getPageSize--) | Retrieves the page size for rendering HTM and HTML files. | +| [setPageSize(PageSize pageSize)](#setPageSize-com.groupdocs.viewer.options.PageSize-) | Sets the page size for rendering HTM and HTML files. | +| [isRenderTrackedChanges()](#isRenderTrackedChanges--) | Indicates whether tracked changes (revisions) rendering is enabled. | +| [setRenderTrackedChanges(boolean value)](#setRenderTrackedChanges-boolean-) | Sets whether tracked changes (revisions) rendering is enabled. | +| [getLeftMargin()](#getLeftMargin--) | Retrieves the left page margin for HTML rendering. | +| [setLeftMargin(Double leftMargin)](#setLeftMargin-java.lang.Double-) | Sets the left page margin for HTML rendering. | +| [setLeftMargin(int leftMargin)](#setLeftMargin-int-) | Sets the left page margin for HTML rendering. | +| [getRightMargin()](#getRightMargin--) | Gets the right page margin for HTML rendering. | +| [setRightMargin(Double rightMargin)](#setRightMargin-java.lang.Double-) | Sets the right page margin for HTML rendering. | +| [setRightMargin(int rightMargin)](#setRightMargin-int-) | Sets the right page margin for HTML rendering. | +| [getTopMargin()](#getTopMargin--) | Retrieves the top page margin for HTML rendering. | +| [setTopMargin(Double topMargin)](#setTopMargin-java.lang.Double-) | Sets the top page margin for HTML rendering. | +| [setTopMargin(int topMargin)](#setTopMargin-int-) | Sets the top page margin for HTML rendering. | +| [isEnableOpenTypeFeatures()](#isEnableOpenTypeFeatures--) | This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts. | +| [setEnableOpenTypeFeatures(boolean enableOpenTypeFeatures)](#setEnableOpenTypeFeatures-boolean-) | This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts. | +| [getBottomMargin()](#getBottomMargin--) | Bottom page margin (for HTML rendering only) | +| [setBottomMargin(Double bottomMargin)](#setBottomMargin-java.lang.Double-) | Sets the bottom page margin for HTML rendering. | +| [setBottomMargin(int bottomMargin)](#setBottomMargin-int-) | Sets the bottom page margin for HTML rendering. | +| [equals(Object o)](#equals-java.lang.Object-) | Check if the options are changed. | +| [hashCode()](#hashCode--) | \{@inheritDoc\} | +### WordProcessingOptions() {#WordProcessingOptions--} +``` +public WordProcessingOptions() +``` + + +Initializes a new instance of the WordProcessingOptions class. + +### getPageSize() {#getPageSize--} +``` +public PageSize getPageSize() +``` + + +Retrieves the page size for rendering HTM and HTML files. + +When using the default page size, some content may not fit into the page frame. To fit the contents, you can set a larger page size, such as A3, using [PageSize.A3](../../com.groupdocs.viewer.options/pagesize\#A3). + +***Note:** The default value is [PageSize.UNSPECIFIED](../../com.groupdocs.viewer.options/pagesize\#UNSPECIFIED), which means that a page size set in the page settings (Page Setup) will be used.* + +**Returns:** +[PageSize](../../com.groupdocs.viewer.options/pagesize) - The size of the output page. +### setPageSize(PageSize pageSize) {#setPageSize-com.groupdocs.viewer.options.PageSize-} +``` +public void setPageSize(PageSize pageSize) +``` + + +Sets the page size for rendering HTM and HTML files. + +When using the default page size, some content may not fit into the page frame. To fit the contents, you can set a larger page size, such as A3, using [PageSize.A3](../../com.groupdocs.viewer.options/pagesize\#A3). + +***Note:** The default value is [PageSize.UNSPECIFIED](../../com.groupdocs.viewer.options/pagesize\#UNSPECIFIED), which means that a page size set in the page settings (Page Setup) will be used.* + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| pageSize | [PageSize](../../com.groupdocs.viewer.options/pagesize) | The size of the output page. | + +### isRenderTrackedChanges() {#isRenderTrackedChanges--} +``` +public final boolean isRenderTrackedChanges() +``` + + +Indicates whether tracked changes (revisions) rendering is enabled. + +**Returns:** +boolean - true if tracked changes rendering is enabled, false otherwise. +### setRenderTrackedChanges(boolean value) {#setRenderTrackedChanges-boolean-} +``` +public final void setRenderTrackedChanges(boolean value) +``` + + +Sets whether tracked changes (revisions) rendering is enabled. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| value | boolean | true to enable tracked changes rendering, false to disable it. | + +### getLeftMargin() {#getLeftMargin--} +``` +public Double getLeftMargin() +``` + + +Retrieves the left page margin for HTML rendering. + +**Returns:** +java.lang.Double - the left page margin value. +### setLeftMargin(Double leftMargin) {#setLeftMargin-java.lang.Double-} +``` +public void setLeftMargin(Double leftMargin) +``` + + +Sets the left page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| leftMargin | java.lang.Double | The left page margin value to set. | + +### setLeftMargin(int leftMargin) {#setLeftMargin-int-} +``` +public void setLeftMargin(int leftMargin) +``` + + +Sets the left page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| leftMargin | int | The left page margin value to set. | + +### getRightMargin() {#getRightMargin--} +``` +public Double getRightMargin() +``` + + +Gets the right page margin for HTML rendering. + +**Returns:** +java.lang.Double - the right page margin value. +### setRightMargin(Double rightMargin) {#setRightMargin-java.lang.Double-} +``` +public void setRightMargin(Double rightMargin) +``` + + +Sets the right page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| rightMargin | java.lang.Double | The right page margin value to set. | + +### setRightMargin(int rightMargin) {#setRightMargin-int-} +``` +public void setRightMargin(int rightMargin) +``` + + +Sets the right page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| rightMargin | int | The right page margin value to set. | + +### getTopMargin() {#getTopMargin--} +``` +public Double getTopMargin() +``` + + +Retrieves the top page margin for HTML rendering. + +**Returns:** +java.lang.Double - the top page margin. +### setTopMargin(Double topMargin) {#setTopMargin-java.lang.Double-} +``` +public void setTopMargin(Double topMargin) +``` + + +Sets the top page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| topMargin | java.lang.Double | The top page margin to set. | + +### setTopMargin(int topMargin) {#setTopMargin-int-} +``` +public void setTopMargin(int topMargin) +``` + + +Sets the top page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| topMargin | int | The top page margin to set. | + +### isEnableOpenTypeFeatures() {#isEnableOpenTypeFeatures--} +``` +public boolean isEnableOpenTypeFeatures() +``` + + +This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts. + +**Returns:** +boolean - True if OpenType features are enabled, false otherwise. +### setEnableOpenTypeFeatures(boolean enableOpenTypeFeatures) {#setEnableOpenTypeFeatures-boolean-} +``` +public void setEnableOpenTypeFeatures(boolean enableOpenTypeFeatures) +``` + + +This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| enableOpenTypeFeatures | boolean | True to enable OpenType features, false otherwise. | + +### getBottomMargin() {#getBottomMargin--} +``` +public Double getBottomMargin() +``` + + +Bottom page margin (for HTML rendering only) + +**Returns:** +java.lang.Double - the bottom page margin. +### setBottomMargin(Double bottomMargin) {#setBottomMargin-java.lang.Double-} +``` +public void setBottomMargin(Double bottomMargin) +``` + + +Sets the bottom page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| bottomMargin | java.lang.Double | The bottom page margin to set. | + +### setBottomMargin(int bottomMargin) {#setBottomMargin-int-} +``` +public void setBottomMargin(int bottomMargin) +``` + + +Sets the bottom page margin for HTML rendering. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| bottomMargin | int | The bottom page margin to set. | + +### equals(Object o) {#equals-java.lang.Object-} +``` +public boolean equals(Object o) +``` + + +Check if the options are changed. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| o | java.lang.Object | The object to compare for equality. | + +**Returns:** +boolean - true if the options are equal to the specified object, false otherwise. +### hashCode() {#hashCode--} +``` +public int hashCode() +``` + + +Computes the hash code value for this object. The hash code is based on the internal state of the object and is used in hash-based data structures such as hash maps and hash sets. + +**Note:** This method overrides the default implementation of the hashCode() method defined in the Object class. + +**Returns:** +int - the hash code value for this object. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/_index.md new file mode 100644 index 00000000..9e45d01b --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/_index.md @@ -0,0 +1,51 @@ +--- +title: com.groupdocs.viewer.results +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides classes and interfaces that represent document rendering results. +type: docs +weight: 16 +url: /nodejs-java/com.groupdocs.viewer.results/ +--- + +The package provides classes and interfaces that represent document rendering results. + +These classes encapsulate information about various elements and components of the rendered document, such as pages, attachments, views, resources, and more. + +The main classes in this package are: + + * [Page](../../com.groupdocs.viewer.results/page) - Represents a single page that can be viewed. + * [Attachment](../../com.groupdocs.viewer.results/attachment) - Represents an attachment file contained by an email message, archive, PDF document, or Outlook data file. + * [PdfViewInfo](../../com.groupdocs.viewer.results/pdfviewinfo) - Represents view information for a PDF document. + +For more details on working with document rendering results using GroupDocs.Viewer, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [Resource](../com.groupdocs.viewer.results/resource) | Represents HTML resource such as font, style, image or graphics. | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [ArchiveViewInfo](../com.groupdocs.viewer.results/archiveviewinfo) | Represents view information for an archive file. | +| [Attachment](../com.groupdocs.viewer.results/attachment) | Represents an attachment file contained by an email message, archive, PDF document, or Outlook data file. | +| [CadViewInfo](../com.groupdocs.viewer.results/cadviewinfo) | Represents view information for a CAD drawing. | +| [Character](../com.groupdocs.viewer.results/character) | Represents a relatively positioned rectangle that contains a single character. | +| [FileInfo](../com.groupdocs.viewer.results/fileinfo) | Contains information about a file. | +| [Layer](../com.groupdocs.viewer.results/layer) | Represents a layer contained by a CAD drawing. | +| [Layout](../com.groupdocs.viewer.results/layout) | Represents a layout contained by a CAD drawing. | +| [Line](../com.groupdocs.viewer.results/line) | Represents a relatively positioned rectangle that contains a single line. | +| [LotusNotesViewInfo](../com.groupdocs.viewer.results/lotusnotesviewinfo) | Represents view information for Lotus Notes database storage. | +| [OutlookViewInfo](../com.groupdocs.viewer.results/outlookviewinfo) | Represents view information for an Outlook Data file. | +| [Page](../com.groupdocs.viewer.results/page) | Represents a single page that can be viewed. | +| [PdfViewInfo](../com.groupdocs.viewer.results/pdfviewinfo) | Represents view information for a PDF document. | +| [ProjectManagementViewInfo](../com.groupdocs.viewer.results/projectmanagementviewinfo) | Represents view information for an MS Project document. | +| [TextElement](../com.groupdocs.viewer.results/textelement) | Represents a generic text element. | +| [ViewInfo](../com.groupdocs.viewer.results/viewinfo) | Represents view information for a generic document. | +| [Word](../com.groupdocs.viewer.results/word) | Represents a relatively positioned rectangle that contains a single word. | diff --git a/english/nodejs-java/com.groupdocs.viewer.results/archiveviewinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/archiveviewinfo/_index.md new file mode 100644 index 00000000..5fc036c0 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/archiveviewinfo/_index.md @@ -0,0 +1,46 @@ +--- +title: ArchiveViewInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents view information for an archive file. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer.results/archiveviewinfo/ +--- +**All Implemented Interfaces:** +[com.groupdocs.viewer.results.ViewInfo](../../com.groupdocs.viewer.results/viewinfo) +``` +public interface ArchiveViewInfo extends ViewInfo +``` + +Represents view information for an archive file. + +The ArchiveViewInfo interface defines the contract for retrieving view information specific to an archive file in the GroupDocs.Viewer component. It provides methods to access details such as page count, dimensions, and rendering options specific to archive files. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.zip")) { + ArchiveViewInfo viewInfo = (ArchiveViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + + // Use the viewInfo object for further operations + } + +``` + +***Note:** The default implementation of this interface is ArchiveViewInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getFolders()](#getFolders--) | Retrieves the list of folders contained within the archive file. | +### getFolders() {#getFolders--} +``` +public abstract List getFolders() +``` + + +Retrieves the list of folders contained within the archive file. + +**Returns:** +java.util.List - the list of folders. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/attachment/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/attachment/_index.md new file mode 100644 index 00000000..3fd55239 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/attachment/_index.md @@ -0,0 +1,87 @@ +--- +title: Attachment +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents an attachment file contained by an email message archive PDF document or Outlook data file. +type: docs +weight: 12 +url: /nodejs-java/com.groupdocs.viewer.results/attachment/ +---``` +public interface Attachment +``` + +Represents an attachment file contained by an email message, archive, PDF document, or Outlook data file. + +The Attachment interface defines the contract for accessing and manipulating attachment files in the GroupDocs.Viewer component. It provides methods to retrieve information such as file name, size, and content type of the attachment. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.eml")) { + List attachments = viewer.getAttachments(); + + // Use the attachments object for further operations + } + +``` + +***Note:** The default implementation of this interface is AttachmentImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getId()](#getId--) | Retrieves the unique identifier of the attachment within the context of a single file that contains this attachment. | +| [getFileName()](#getFileName--) | Retrieves the file name of the attachment. | +| [getFilePath()](#getFilePath--) | Retrieves the relative path of the attachment. | +| [getSize()](#getSize--) | Retrieves the file size of the attachment in bytes. | +| [getFileType()](#getFileType--) | Retrieves the file type of the attachment. | +### getId() {#getId--} +``` +public abstract String getId() +``` + + +Retrieves the unique identifier of the attachment within the context of a single file that contains this attachment. + +**Returns:** +java.lang.String - the unique identifier of the attachment. +### getFileName() {#getFileName--} +``` +public abstract String getFileName() +``` + + +Retrieves the file name of the attachment. + +**Returns:** +java.lang.String - the file name of the attachment. +### getFilePath() {#getFilePath--} +``` +public abstract String getFilePath() +``` + + +Retrieves the relative path of the attachment. The path can be in the format "folder/file.docx" when the file is located within a folder, or it can be the filename when the file is located in the root of an archive, an e-mail message, or a data file. + +**Returns:** +java.lang.String - the relative path of the attachment. +### getSize() {#getSize--} +``` +public abstract long getSize() +``` + + +Retrieves the file size of the attachment in bytes. + +**Returns:** +long - the file size of the attachment. +### getFileType() {#getFileType--} +``` +public abstract FileType getFileType() +``` + + +Retrieves the file type of the attachment. + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the file type of the attachment. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/cadviewinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/cadviewinfo/_index.md new file mode 100644 index 00000000..630f8d89 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/cadviewinfo/_index.md @@ -0,0 +1,57 @@ +--- +title: CadViewInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents view information for a CAD drawing. +type: docs +weight: 13 +url: /nodejs-java/com.groupdocs.viewer.results/cadviewinfo/ +--- +**All Implemented Interfaces:** +[com.groupdocs.viewer.results.ViewInfo](../../com.groupdocs.viewer.results/viewinfo) +``` +public interface CadViewInfo extends ViewInfo +``` + +Represents view information for a CAD drawing. + +The CadViewInfo interface defines the contract for retrieving view information specific to a CAD drawing in the GroupDocs.Viewer component. It provides methods to access to CAD drawings layers. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.plt")) { + CadViewInfo viewInfo = (CadViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + + // Use the viewInfo object for further operations + } + +``` + +***Note:** The default implementation of this interface is CadViewInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getLayers()](#getLayers--) | Retrieves the list of layers in the CAD drawing. | +| [getLayouts()](#getLayouts--) | Retrieves the list of layouts contained within the CAD drawing. | +### getLayers() {#getLayers--} +``` +public abstract List getLayers() +``` + + +Retrieves the list of layers in the CAD drawing. + +**Returns:** +java.util.List - the layers in the CAD drawing. +### getLayouts() {#getLayouts--} +``` +public abstract List getLayouts() +``` + + +Retrieves the list of layouts contained within the CAD drawing. + +**Returns:** +java.util.List - the layouts in the CAD drawing. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/character/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/character/_index.md new file mode 100644 index 00000000..21e0bd25 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/character/_index.md @@ -0,0 +1,33 @@ +--- +title: Character +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a relatively positioned rectangle that contains a single character. +type: docs +weight: 14 +url: /nodejs-java/com.groupdocs.viewer.results/character/ +--- +**All Implemented Interfaces:** +com.groupdocs.viewer.results.TextElement, java.io.Serializable +``` +public interface Character extends TextElement, Serializable +``` + +Represents a relatively positioned rectangle that contains a single character. + +The Character interface defines the contract for accessing and manipulating a character represented by a rectangle in the GroupDocs.Viewer component. It provides methods to retrieve information such as the character itself, position, and size of the rectangle. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.pdf")) { + PdfViewInfo viewInfo = (PdfViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + List characters = viewInfo.getPages().get(0).getLines().get(0).getWords().get(0).getCharacters(); + Character character = characters.get(0); + + // Use the character object for further operations + } + +``` + +***Note:** The default implementation of this interface is CharacterImpl.* diff --git a/english/nodejs-java/com.groupdocs.viewer.results/fileinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/fileinfo/_index.md new file mode 100644 index 00000000..62a2449c --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/fileinfo/_index.md @@ -0,0 +1,68 @@ +--- +title: FileInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Contains information about a file. +type: docs +weight: 15 +url: /nodejs-java/com.groupdocs.viewer.results/fileinfo/ +---``` +public interface FileInfo +``` + +Contains information about a file. + +The FileInfo interface defines the contract for accessing and retrieving information about a file in the GroupDocs.Viewer component. It provides methods to retrieve details such as the file type, encryption and so on. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.pdf")) { + FileInfo fileInfo = viewer.getFileInfo(); + + // Use the fileInfo object for further operations + } + +``` + +***Note:** The default implementation of this interface is FileInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getFileType()](#getFileType--) | Retrieves the type of the file. | +| [isEncrypted()](#isEncrypted--) | Checks if the file is encrypted. | +| [setEncrypted(boolean encrypted)](#setEncrypted-boolean-) | Sets the encryption status of the file. | +### getFileType() {#getFileType--} +``` +public abstract FileType getFileType() +``` + + +Retrieves the type of the file. + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the file type. +### isEncrypted() {#isEncrypted--} +``` +public abstract boolean isEncrypted() +``` + + +Checks if the file is encrypted. + +**Returns:** +boolean - true if the file is encrypted, false otherwise. +### setEncrypted(boolean encrypted) {#setEncrypted-boolean-} +``` +public abstract void setEncrypted(boolean encrypted) +``` + + +Sets the encryption status of the file. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| encrypted | boolean | true to indicate that the file is encrypted, false otherwise. | + diff --git a/english/nodejs-java/com.groupdocs.viewer.results/layer/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/layer/_index.md new file mode 100644 index 00000000..eeb957e2 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/layer/_index.md @@ -0,0 +1,79 @@ +--- +title: Layer +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a layer contained by a CAD drawing. +type: docs +weight: 16 +url: /nodejs-java/com.groupdocs.viewer.results/layer/ +--- +**All Implemented Interfaces:** +java.io.Serializable +``` +public interface Layer extends Serializable +``` + +Represents a layer contained by a CAD drawing. + +The Layer interface defines the contract for accessing and manipulating a layer within a CAD drawing in the GroupDocs.Viewer component. It provides methods to retrieve information such as the layer name, visibility, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.mpt")) { + CadViewInfo viewInfo = (CadViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + List layers = viewInfo.getLayers(); + for (Layer layer : layers) { + // Use the layer object for further operations + } + } + +``` + +***Note:** The default implementation of this interface is LayerImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getName()](#getName--) | Retrieves the name of the layer. | +| [isVisible()](#isVisible--) | Checks the visibility of the layer. | +| [equals(Object other)](#equals-java.lang.Object-) | Checks if this object is equal to the provided object. | +### getName() {#getName--} +``` +public abstract String getName() +``` + + +Retrieves the name of the layer. + +**Note:** Layer names are case sensitive. + +**Returns:** +java.lang.String - the name of the layer. +### isVisible() {#isVisible--} +``` +public abstract boolean isVisible() +``` + + +Checks the visibility of the layer. + +The CAD drawing layers that are switched off or frozen are invisible. To render layers that are invisible, use the [CadOptions.setLayers(List)](../../com.groupdocs.viewer.options/cadoptions\#setLayers-List-) option. + +**Returns:** +boolean - true if the layer is visible, false otherwise. +### equals(Object other) {#equals-java.lang.Object-} +``` +public abstract boolean equals(Object other) +``` + + +Checks if this object is equal to the provided object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| other | java.lang.Object | The object to compare. | + +**Returns:** +boolean - true if the objects are equal, false otherwise. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/layout/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/layout/_index.md new file mode 100644 index 00000000..a1a7e544 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/layout/_index.md @@ -0,0 +1,86 @@ +--- +title: Layout +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a layout contained by a CAD drawing. +type: docs +weight: 17 +url: /nodejs-java/com.groupdocs.viewer.results/layout/ +--- +**All Implemented Interfaces:** +java.io.Serializable +``` +public interface Layout extends Serializable +``` + +Represents a layout contained by a CAD drawing. + +The Layout interface defines the contract for accessing and manipulating a layout within a CAD drawing in the GroupDocs.Viewer component. It provides methods to retrieve information such as the layout name, dimensions, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.mpt")) { + CadViewInfo viewInfo = (CadViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + List layouts = viewInfo.getLayouts(); + for (Layout layout : layouts) { + // Use the layout object for further operations + } + } + +``` + +***Note:** The default implementation of this interface is LayoutImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getName()](#getName--) | Retrieves the name of the layout. | +| [getWidth()](#getWidth--) | Retrieves the width of the layout. | +| [getHeight()](#getHeight--) | Retrieves the height of the layout. | +| [equals(Object other)](#equals-java.lang.Object-) | Checks if this object is equal to the provided object. | +### getName() {#getName--} +``` +public abstract String getName() +``` + + +Retrieves the name of the layout. + +**Returns:** +java.lang.String - the name of the layout. +### getWidth() {#getWidth--} +``` +public abstract double getWidth() +``` + + +Retrieves the width of the layout. + +**Returns:** +double - the width of the layout. +### getHeight() {#getHeight--} +``` +public abstract double getHeight() +``` + + +Retrieves the height of the layout. + +**Returns:** +double - the height of the layout. +### equals(Object other) {#equals-java.lang.Object-} +``` +public abstract boolean equals(Object other) +``` + + +Checks if this object is equal to the provided object. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| other | java.lang.Object | The object to compare. | + +**Returns:** +boolean - true if the objects are equal, false otherwise. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/line/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/line/_index.md new file mode 100644 index 00000000..952b73ba --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/line/_index.md @@ -0,0 +1,48 @@ +--- +title: Line +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a relatively positioned rectangle that contains a single line. +type: docs +weight: 18 +url: /nodejs-java/com.groupdocs.viewer.results/line/ +--- +**All Implemented Interfaces:** +com.groupdocs.viewer.results.TextElement, java.io.Serializable +``` +public interface Line extends TextElement, Serializable +``` + +Represents a relatively positioned rectangle that contains a single line. + +The Line interface defines the contract for accessing and manipulating a line represented by a rectangle in the GroupDocs.Viewer component. It provides methods to retrieve information such as the line text, position, and size of the rectangle. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.pdf")) { + PdfViewInfo viewInfo = (PdfViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + List lines = viewInfo.getPages().get(0).getLines(); + for (Line line : lines) { + // Use the line object for further operations + } + } + +``` + +***Note:** The default implementation of this interface is LineImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getWords()](#getWords--) | Retrieves the words contained in the line. | +### getWords() {#getWords--} +``` +public abstract List getWords() +``` + + +Retrieves the words contained in the line. + +**Returns:** +java.util.List - the words contained in the line. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/lotusnotesviewinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/lotusnotesviewinfo/_index.md new file mode 100644 index 00000000..d5159275 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/lotusnotesviewinfo/_index.md @@ -0,0 +1,45 @@ +--- +title: LotusNotesViewInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents view information for Lotus Notes database storage. +type: docs +weight: 19 +url: /nodejs-java/com.groupdocs.viewer.results/lotusnotesviewinfo/ +--- +**All Implemented Interfaces:** +[com.groupdocs.viewer.results.ViewInfo](../../com.groupdocs.viewer.results/viewinfo) +``` +public interface LotusNotesViewInfo extends ViewInfo +``` + +Represents view information for Lotus Notes database storage. + +The LotusNotesViewInfo interface defines the contract for accessing and manipulating view information for Lotus Notes database storage in the GroupDocs.Viewer component. It provides methods to retrieve information such as notes count, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.nsf")) { + final LotusNotesViewInfo viewInfo = (LotusNotesViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + // Use the viewInfo object for further operations + } + +``` + +***Note:** The default implementation of this interface is LotusNotesViewInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getNotesCount()](#getNotesCount--) | Retrieves the count of notes in the storage. | +### getNotesCount() {#getNotesCount--} +``` +public abstract int getNotesCount() +``` + + +Retrieves the count of notes in the storage. + +**Returns:** +int - the count of notes in the storage. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/outlookviewinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/outlookviewinfo/_index.md new file mode 100644 index 00000000..df13781e --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/outlookviewinfo/_index.md @@ -0,0 +1,45 @@ +--- +title: OutlookViewInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents view information for an Outlook Data file. +type: docs +weight: 20 +url: /nodejs-java/com.groupdocs.viewer.results/outlookviewinfo/ +--- +**All Implemented Interfaces:** +[com.groupdocs.viewer.results.ViewInfo](../../com.groupdocs.viewer.results/viewinfo) +``` +public interface OutlookViewInfo extends ViewInfo +``` + +Represents view information for an Outlook Data file. + +The OutlookViewInfo interface defines the contract for accessing and manipulating view information for an Outlook Data file in the GroupDocs.Viewer component. It provides methods to retrieve information such as a list of folders, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.pst")) { + final OutlookViewInfo viewInfo = (OutlookViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + // Use the viewInfo object for further operations + } + +``` + +***Note:** The default implementation of this interface is OutlookViewInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getFolders()](#getFolders--) | Retrieves the list of folders contained in the Outlook Data file. | +### getFolders() {#getFolders--} +``` +public abstract List getFolders() +``` + + +Retrieves the list of folders contained in the Outlook Data file. + +**Returns:** +java.util.List - the list of folders. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/page/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/page/_index.md new file mode 100644 index 00000000..f0a38ce5 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/page/_index.md @@ -0,0 +1,103 @@ +--- +title: Page +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a single page that can be viewed. +type: docs +weight: 21 +url: /nodejs-java/com.groupdocs.viewer.results/page/ +--- +**All Implemented Interfaces:** +java.io.Serializable +``` +public interface Page extends Serializable +``` + +Represents a single page that can be viewed. + +The Page interface defines the contract for accessing and manipulating a single page that can be viewed in the GroupDocs.Viewer component. It provides methods to retrieve information such as the page number, size, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.pst")) { + final OutlookViewInfo viewInfo = (OutlookViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + List pages = viewInfo.getPages(); + for (Page page : pages) { + // Use the page object for further operations + } + } + +``` + +***Note:** The default implementation of this interface is PageImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getName()](#getName--) | Retrieves the name of the worksheet or page. | +| [getNumber()](#getNumber--) | Retrieves the page number. | +| [isVisible()](#isVisible--) | Retrieves the page visibility indicator. | +| [getWidth()](#getWidth--) | Retrieves the width of the page in pixels when viewing as JPG or PNG. | +| [getHeight()](#getHeight--) | Retrieves the height of the page in pixels when viewing as JPG or PNG. | +| [getLines()](#getLines--) | Retrieves the lines contained in the page when viewing as JPG or PNG with enabled Text Extraction. | +### getName() {#getName--} +``` +public abstract String getName() +``` + + +Retrieves the name of the worksheet or page. + +**Returns:** +java.lang.String - the name of the worksheet or page. +### getNumber() {#getNumber--} +``` +public abstract int getNumber() +``` + + +Retrieves the page number. + +**Returns:** +int - the page number. +### isVisible() {#isVisible--} +``` +public abstract boolean isVisible() +``` + + +Retrieves the page visibility indicator. + +**Returns:** +boolean - the page visibility indicator. +### getWidth() {#getWidth--} +``` +public abstract int getWidth() +``` + + +Retrieves the width of the page in pixels when viewing as JPG or PNG. + +**Returns:** +int - the width of the page. +### getHeight() {#getHeight--} +``` +public abstract int getHeight() +``` + + +Retrieves the height of the page in pixels when viewing as JPG or PNG. + +**Returns:** +int - the height of the page. +### getLines() {#getLines--} +``` +public abstract List getLines() +``` + + +Retrieves the lines contained in the page when viewing as JPG or PNG with enabled Text Extraction. + +**Returns:** +java.util.List - the lines contained in the page. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/pdfviewinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/pdfviewinfo/_index.md new file mode 100644 index 00000000..b24b5e23 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/pdfviewinfo/_index.md @@ -0,0 +1,45 @@ +--- +title: PdfViewInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents view information for a PDF document. +type: docs +weight: 22 +url: /nodejs-java/com.groupdocs.viewer.results/pdfviewinfo/ +--- +**All Implemented Interfaces:** +[com.groupdocs.viewer.results.ViewInfo](../../com.groupdocs.viewer.results/viewinfo) +``` +public interface PdfViewInfo extends ViewInfo +``` + +Represents view information for a PDF document. + +The PdfViewInfo interface defines the contract for accessing and manipulating view information for a PDF document in the GroupDocs.Viewer component. It provides methods to retrieve information such as allowing printing, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.pdf")) { + final PdfViewInfo viewInfo = (PdfViewInfo) viewer.getViewInfo(ViewInfoOptions.forPngView()); + // Use the viewInfo object for further operations + } + +``` + +***Note:** The default implementation of this interface is PdfViewInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [isPrintingAllowed()](#isPrintingAllowed--) | Checks if printing of the document is allowed. | +### isPrintingAllowed() {#isPrintingAllowed--} +``` +public abstract boolean isPrintingAllowed() +``` + + +Checks if printing of the document is allowed. + +**Returns:** +boolean - true if printing is allowed, false otherwise. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/projectmanagementviewinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/projectmanagementviewinfo/_index.md new file mode 100644 index 00000000..ee819f17 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/projectmanagementviewinfo/_index.md @@ -0,0 +1,56 @@ +--- +title: ProjectManagementViewInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents view information for an MS Project document. +type: docs +weight: 23 +url: /nodejs-java/com.groupdocs.viewer.results/projectmanagementviewinfo/ +--- +**All Implemented Interfaces:** +[com.groupdocs.viewer.results.ViewInfo](../../com.groupdocs.viewer.results/viewinfo) +``` +public interface ProjectManagementViewInfo extends ViewInfo +``` + +Represents view information for an MS Project document. + +The ProjectManagementViewInfo interface defines the contract for accessing and manipulating view information for an MS Project document in the GroupDocs.Viewer component. It provides methods to retrieve information such as the start and end dates, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.mpp")) { + final ProjectManagementViewInfo viewInfo = (ProjectManagementViewInfo) viewer.getViewInfo(ViewInfoOptions.forPngView()); + // Use the viewInfo object for further operations + } + +``` + +***Note:** The default implementation of this interface is ProjectManagementViewInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getStartDate()](#getStartDate--) | Retrieves the date and time from which the project started. | +| [getEndDate()](#getEndDate--) | Retrieves the date and time when the project is to be completed. | +### getStartDate() {#getStartDate--} +``` +public abstract Date getStartDate() +``` + + +Retrieves the date and time from which the project started. + +**Returns:** +java.util.Date - the start date and time of the project. +### getEndDate() {#getEndDate--} +``` +public abstract Date getEndDate() +``` + + +Retrieves the date and time when the project is to be completed. + +**Returns:** +java.util.Date - the end date and time of the project. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/resource/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/resource/_index.md new file mode 100644 index 00000000..751add29 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/resource/_index.md @@ -0,0 +1,93 @@ +--- +title: Resource +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents HTML resource such as font style image or graphics. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer.results/resource/ +--- +**Inheritance:** +java.lang.Object + +**All Implemented Interfaces:** +java.io.Serializable +``` +public class Resource implements Serializable +``` + +Represents HTML resource such as font, style, image or graphics. + +The Resource class represents a resource used in HTML rendering in the GroupDocs.Viewer component. It can represent various types of resources, such as fonts, styles, images, or graphics, that are included or referenced in the generated HTML output during the rendering process. + +Example usage: + +``` + + final HtmlViewOptions htmlViewOptions = HtmlViewOptions.forExternalResources(pageNumber -> , new ReleaseResourceStream() { + @Override + public void invoke(int pageNumber, Resource resource, OutputStream resourceStream) { + // Handle resource + } + }); + try (Viewer viewer = new Viewer("document.pdf")) { + viewer.view(htmlViewOptions); + // Use the viewer object for further operations + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Resource(String fileName, boolean nested)](#Resource-java.lang.String-boolean-) | Creates a new instance of the Resource class. | +## Methods + +| Method | Description | +| --- | --- | +| [getFileName()](#getFileName--) | Returns the file name of the resource. | +| [isNested()](#isNested--) | Returns whether the resource resides inside another resource, e.g. a font resource that resides in a CSS or SVG resource. | +| [toString()](#toString--) | Returns a string that represents the current object. | +### Resource(String fileName, boolean nested) {#Resource-java.lang.String-boolean-} +``` +public Resource(String fileName, boolean nested) +``` + + +Creates a new instance of the Resource class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileName | java.lang.String | The resource file name. | +| nested | boolean | Indicates whether the resource resides inside another resource, e.g., a font resource that resides in a CSS or SVG resource. | + +### getFileName() {#getFileName--} +``` +public final String getFileName() +``` + + +Returns the file name of the resource. + +**Returns:** +java.lang.String - the file name of the resource. +### isNested() {#isNested--} +``` +public final boolean isNested() +``` + + +Returns whether the resource resides inside another resource, e.g. a font resource that resides in a CSS or SVG resource. + +**Returns:** +boolean - Whether the resource resides inside another resource. +### toString() {#toString--} +``` +public String toString() +``` + + +Returns a string that represents the current object. + +**Returns:** +java.lang.String - the string representation of the current object. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/textelement/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/textelement/_index.md new file mode 100644 index 00000000..9bce96ad --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/textelement/_index.md @@ -0,0 +1,75 @@ +--- +title: TextElement +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a generic text element. +type: docs +weight: 24 +url: /nodejs-java/com.groupdocs.viewer.results/textelement/ +---``` +public interface TextElement +``` + +Represents a generic text element. + +The TextElement interface defines the contract for a generic text element in the GroupDocs.Viewer component. It represents a text element with a specific type and provides methods to access and manipulate the text content. + +***Note:** The default implementation of this interface is TextElementImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getValue()](#getValue--) | Retrieves the value of the text element. | +| [getX()](#getX--) | Retrieves the X coordinate of the highest left point on the page layout where the rectangle that contains the element begins. | +| [getY()](#getY--) | Retrieves the Y coordinate of the highest left point on the page layout where the rectangle that contains the element begins. | +| [getWidth()](#getWidth--) | Retrieves the width of the rectangle that contains the element (in pixels). | +| [getHeight()](#getHeight--) | Retrieves the height of the rectangle that contains the element (in pixels). | +### getValue() {#getValue--} +``` +public abstract T getValue() +``` + + +Retrieves the value of the text element. + +**Returns:** +T - the value of the text element. +### getX() {#getX--} +``` +public abstract double getX() +``` + + +Retrieves the X coordinate of the highest left point on the page layout where the rectangle that contains the element begins. + +**Returns:** +double - the X coordinate of the starting point. +### getY() {#getY--} +``` +public abstract double getY() +``` + + +Retrieves the Y coordinate of the highest left point on the page layout where the rectangle that contains the element begins. + +**Returns:** +double - the Y coordinate of the starting point. +### getWidth() {#getWidth--} +``` +public abstract double getWidth() +``` + + +Retrieves the width of the rectangle that contains the element (in pixels). + +**Returns:** +double - the width of the rectangle. +### getHeight() {#getHeight--} +``` +public abstract double getHeight() +``` + + +Retrieves the height of the rectangle that contains the element (in pixels). + +**Returns:** +double - the height of the rectangle. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/viewinfo/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/viewinfo/_index.md new file mode 100644 index 00000000..59f610cf --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/viewinfo/_index.md @@ -0,0 +1,57 @@ +--- +title: ViewInfo +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents view information for a generic document. +type: docs +weight: 25 +url: /nodejs-java/com.groupdocs.viewer.results/viewinfo/ +---``` +public interface ViewInfo +``` + +Represents view information for a generic document. + +The ViewInfo interface defines the contract for accessing and manipulating view information for a generic document in the GroupDocs.Viewer component. It provides methods to retrieve information such as the file type, pages, and other properties. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.mpp")) { + final ViewInfo viewInfo = viewer.getViewInfo(ViewInfoOptions.forPngView()); + if (viewInfo instanceof ProjectManagementViewInfo) { + ProjectManagementViewInfo projectManagementViewInfo = (ProjectManagementViewInfo) viewInfo; + // Use the projectManagementViewInfo object for further operations + } + // ... + } + +``` + +***Note:** The default implementation of this interface is ViewInfoImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getFileType()](#getFileType--) | Retrieves the type of the file. | +| [getPages()](#getPages--) | Retrieves the list of pages to view. | +### getFileType() {#getFileType--} +``` +public abstract FileType getFileType() +``` + + +Retrieves the type of the file. + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the file type. +### getPages() {#getPages--} +``` +public abstract List getPages() +``` + + +Retrieves the list of pages to view. + +**Returns:** +java.util.List - the list of pages. diff --git a/english/nodejs-java/com.groupdocs.viewer.results/word/_index.md b/english/nodejs-java/com.groupdocs.viewer.results/word/_index.md new file mode 100644 index 00000000..5b61338f --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.results/word/_index.md @@ -0,0 +1,48 @@ +--- +title: Word +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents a relatively positioned rectangle that contains a single word. +type: docs +weight: 26 +url: /nodejs-java/com.groupdocs.viewer.results/word/ +--- +**All Implemented Interfaces:** +com.groupdocs.viewer.results.TextElement, java.io.Serializable +``` +public interface Word extends TextElement, Serializable +``` + +Represents a relatively positioned rectangle that contains a single word. + +The Word interface represents a word within a relatively positioned rectangle in the GroupDocs.Viewer component. It extends the TextElement interface and provides additional methods to access and manipulate the word content. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("document.pdf")) { + PdfViewInfo viewInfo = (PdfViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView()); + List words = viewInfo.getPages().get(0).getLines().get(0).getWords(); + for (Word word : words) { + // Use the word object for further operations + } + } + +``` + +***Note:** The default implementation of this interface is WordImpl.* +## Methods + +| Method | Description | +| --- | --- | +| [getCharacters()](#getCharacters--) | Retrieves the characters contained by the word. | +### getCharacters() {#getCharacters--} +``` +public abstract List getCharacters() +``` + + +Retrieves the characters contained by the word. + +**Returns:** +java.util.List - the list of characters. diff --git a/english/nodejs-java/com.groupdocs.viewer.utils/_index.md b/english/nodejs-java/com.groupdocs.viewer.utils/_index.md new file mode 100644 index 00000000..c8d37277 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.utils/_index.md @@ -0,0 +1,30 @@ +--- +title: com.groupdocs.viewer.utils +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides helper and utility classes for various functionalities. +type: docs +weight: 17 +url: /nodejs-java/com.groupdocs.viewer.utils/ +--- + +The package provides helper and utility classes for various functionalities. + +These classes offer convenient methods and functionalities to assist in different operations. + +The main classes in this package are: + + * [MemoryCleaner](../../com.groupdocs.viewer.utils/memorycleaner) - Provides methods to clean up resources and free memory. + * [PathUtils](../../com.groupdocs.viewer.utils/pathutils) - Represents the type for working with paths. + +For more details on using the utility classes in the com.groupdocs.viewer.utils package, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [MemoryCleaner](../com.groupdocs.viewer.utils/memorycleaner) | Cleans different resources to free memory. | +| [PathUtils](../com.groupdocs.viewer.utils/pathutils) | The PathUtils class provides utility methods for working with file paths. | diff --git a/english/nodejs-java/com.groupdocs.viewer.utils/memorycleaner/_index.md b/english/nodejs-java/com.groupdocs.viewer.utils/memorycleaner/_index.md new file mode 100644 index 00000000..08a73b2a --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.utils/memorycleaner/_index.md @@ -0,0 +1,110 @@ +--- +title: MemoryCleaner +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Cleans different resources to free memory. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer.utils/memorycleaner/ +--- +**Inheritance:** +java.lang.Object +``` +public final class MemoryCleaner +``` + +Cleans different resources to free memory. + +This class provides methods to clear heap memory, delete temp files, and clear font registry information. It also includes a method to safely clear thread-local instances for the current thread. + +Example usage: + +``` + + // Clean heap memory, keeping font settings + MemoryCleaner.clearKeepingFontSettings(); + + // Clean heap memory and delete temp files + MemoryCleaner.clear(); + + // Clean heap memory from static PDF instances + MemoryCleaner.clearStaticInstances(); + + // Delete all temp files created by PDF in the system temp directory + MemoryCleaner.clearAllTempFiles(); + + // Clear font registry information from heap memory + MemoryCleaner.clearFontRegistry(); + + // Safely clear thread-local instances for the current thread + MemoryCleaner.clearCurrentThreadLocals(); + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [MemoryCleaner()](#MemoryCleaner--) | | +## Methods + +| Method | Description | +| --- | --- | +| [clearKeepingFontSettings()](#clearKeepingFontSettings--) | Clears heap memory from static PDF instances (static and threadLocal) and deletes all temp files. | +| [clear()](#clear--) | Clears heap memory from static PDF instances (static and threadLocal) and deletes all temp files. | +| [clearStaticInstances()](#clearStaticInstances--) | Clears heap memory from static PDF instances. | +| [clearAllTempFiles()](#clearAllTempFiles--) | Clears temp files created by GroupDocs.Viewer in the system temp directory. | +| [clearFontRegistry()](#clearFontRegistry--) | Clears font registry information from heap memory. | +| [clearCurrentThreadLocals()](#clearCurrentThreadLocals--) | Safely clears heap memory from thread-local instances for the current thread. | +### MemoryCleaner() {#MemoryCleaner--} +``` +public MemoryCleaner() +``` + + +### clearKeepingFontSettings() {#clearKeepingFontSettings--} +``` +public static void clearKeepingFontSettings() +``` + + +Clears heap memory from static PDF instances (static and threadLocal) and deletes all temp files. This method does not affect font settings. + +### clear() {#clear--} +``` +public static void clear() +``` + + +Clears heap memory from static PDF instances (static and threadLocal) and deletes all temp files. + +### clearStaticInstances() {#clearStaticInstances--} +``` +public static void clearStaticInstances() +``` + + +Clears heap memory from static PDF instances. + +### clearAllTempFiles() {#clearAllTempFiles--} +``` +public static void clearAllTempFiles() +``` + + +Clears temp files created by GroupDocs.Viewer in the system temp directory. + +### clearFontRegistry() {#clearFontRegistry--} +``` +public static void clearFontRegistry() +``` + + +Clears font registry information from heap memory. + +### clearCurrentThreadLocals() {#clearCurrentThreadLocals--} +``` +public static void clearCurrentThreadLocals() +``` + + +Safely clears heap memory from thread-local instances for the current thread. + diff --git a/english/nodejs-java/com.groupdocs.viewer.utils/pathutils/_index.md b/english/nodejs-java/com.groupdocs.viewer.utils/pathutils/_index.md new file mode 100644 index 00000000..db8bca19 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer.utils/pathutils/_index.md @@ -0,0 +1,62 @@ +--- +title: PathUtils +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The PathUtils class provides utility methods for working with file paths. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer.utils/pathutils/ +--- +**Inheritance:** +java.lang.Object +``` +public class PathUtils +``` + +The PathUtils class provides utility methods for working with file paths. + +The PathUtils class contains static methods that allow you to perform various operations on file paths in the GroupDocs.Viewer component. + +Example usage: + +``` + + String combinedPath = PathUtils.combine("part", "of", "path"); + String fileName = PathUtils.getFileName("/path/to/file.txt"); + +``` +## Methods + +| Method | Description | +| --- | --- | +| [combine(String[] params)](#combine-java.lang.String...-) | Combine paths parts using separator. | +| [getFileName(String path)](#getFileName-java.lang.String-) | Gets file name. | +### combine(String[] params) {#combine-java.lang.String...-} +``` +public static String combine(String[] params) +``` + + +Combine paths parts using separator. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| params | java.lang.String[] | the paths parts | + +**Returns:** +java.lang.String - the result path +### getFileName(String path) {#getFileName-java.lang.String-} +``` +public static String getFileName(String path) +``` + + +Gets file name. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| path | java.lang.String | the path | + +**Returns:** +java.lang.String - the file name diff --git a/english/nodejs-java/com.groupdocs.viewer/_index.md b/english/nodejs-java/com.groupdocs.viewer/_index.md new file mode 100644 index 00000000..202375ce --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer/_index.md @@ -0,0 +1,37 @@ +--- +title: com.groupdocs.viewer +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: The package provides classes for rendering documents in HTML5 Image or PDF modes with fast and high-quality results. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer/ +--- + +The package provides classes for rendering documents in HTML5, Image, or PDF modes with fast and high-quality results. + +The main classes in this package are: + + * [License](../../com.groupdocs.viewer/license) - Provides methods for licensing Viewer. + * [Viewer](../../com.groupdocs.viewer/viewer) - Represents the main class that controls the document rendering process. + * [ViewerSettings](../../com.groupdocs.viewer/viewersettings) - Defines settings for customizing the behavior of the Viewer. + +For more details on working with the document rendering process using GroupDocs.Viewer for Java, please refer to the [GroupDocs.Viewer Documentation][]. + + +[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/ + + +## Classes + +| Class | Description | +| --- | --- | +| [License](../com.groupdocs.viewer/license) | Provides methods to license the component and unlock its full functionality. | +| [Metered](../com.groupdocs.viewer/metered) | Provides methods for applying metered license to the GroupDocs.Viewer component. | +| [Viewer](../com.groupdocs.viewer/viewer) | Represents the main class that controls the document rendering process. | +| [ViewerSettings](../com.groupdocs.viewer/viewersettings) | Defines settings for customizing the behavior of the Viewer component. | + +## Enumerations + +| Enum | Description | +| --- | --- | +| [FileType](../com.groupdocs.viewer/filetype) | Represents the file type. | diff --git a/english/nodejs-java/com.groupdocs.viewer/filetype/_index.md b/english/nodejs-java/com.groupdocs.viewer/filetype/_index.md new file mode 100644 index 00000000..a8fdeaa6 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer/filetype/_index.md @@ -0,0 +1,2594 @@ +--- +title: FileType +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents the file type. +type: docs +weight: 14 +url: /nodejs-java/com.groupdocs.viewer/filetype/ +--- +**Inheritance:** +java.lang.Object, java.lang.Enum + +**All Implemented Interfaces:** +com.aspose.ms.System.IEquatable, com.groupdocs.viewer.caching.Cacheable +``` +public enum FileType extends Enum implements System.IEquatable, Cacheable +``` + +Represents the file type. Provides methods to obtain a list of all file types supported by the GroupDocs.Viewer component. + +The FileType enum provides constants representing different file types that are supported by the GroupDocs.Viewer component. You can use the methods in this enum to obtain a list of all supported file types or check if a specific file type is supported. + +Example usage: + +``` + + // Try to detect file type using stream + final FileType fileTypeFromStream = FileType.fromStream(new FileInputStream("document.pdf")); + // Detect file type by extension + final FileType fileTypeFromExtension = FileType.fromExtension(".png"); + // Iterate all supported file types + for (FileType supportedFileType : FileType.getSupportedFileTypes()) { + System.out.println("File type: " + supportedFileType); + } + final LoadOptions loadOptions = new LoadOptions(fileTypeFromExtension); + // Usage of loadOptions + +``` +## Fields + +| Field | Description | +| --- | --- | +| [UNKNOWN](#UNKNOWN) | Represents an unknown file type. | +| [ZIP](#ZIP) | Represents a zipped file (.zip) that can hold one or more files or directories. | +| [TAR](#TAR) | Represents a consolidated Unix file archive (.tar) created for collecting one or more files. | +| [XZ](#XZ) | Represents an XZ file (.xz) compressed using a high-ratio compression algorithm based on the LZMA algorithm. | +| [TXZ](#TXZ) | Represents a consolidated Unix file archive (.txz, .tar.xz) created for collecting one or more files. | +| [TARXZ](#TARXZ) | Represents a consolidated Unix file archive (.txz, .tar.xz) created for collecting one or more files. | +| [TGZ](#TGZ) | Represents a consolidated Unix file archive (.tgz, .tar.gz) created for collecting one or more files. | +| [TARGZ](#TARGZ) | Represents a consolidated Unix file archive (.tgz, .tar.gz) created for collecting one or more files. | +| [BZ_2](#BZ-2) | Represents a Bzip2 compressed file (.bz2) generated using the BZIP2 open-source compression method. | +| [RAR](#RAR) | Represents a Roshal Archive (.rar) compressed file generated using the RAR (WINRAR version 4) compression method. | +| [GZ](#GZ) | Represents a Gnu Zipped File (.gz) compressed file created with the gzip compression application. | +| [GZIP](#GZIP) | Represents a Gnu Zipped File (.gzip) compressed file introduced as a free utility for replacing the Compress program used in Unix systems. | +| [SEVEN_ZIP](#SEVEN-ZIP) | Represents a 7Zip (.7z, .7zip) file, which is a free open-source archiver with LZMA and LZMA2 compression. | +| [CPIO](#CPIO) | Cpio is a general file archiver utility and its associated file format. | +| [DXF](#DXF) | Represents a Drawing Exchange Format File (.dxf), which is a tagged data representation of an AutoCAD drawing file. | +| [DWG](#DWG) | Represents an AutoCAD Drawing Database File (.dwg), which represents proprietary binary files used for containing 2D and 3D design data. | +| [DWT](#DWT) | Represents an AutoCAD Drawing Template (.dwt), which is an AutoCAD drawing template file used as a starter for creating drawings that can be saved as DWG files. | +| [STL](#STL) | Represents a Stereolithography File (.stl), which is an interchangeable file format that represents 3-dimensional surface geometry. | +| [IFC](#IFC) | Represents an Industry Foundation Classes File (.ifc), which is a file format that establishes international standards for importing and exporting building objects and their properties. | +| [DWF](#DWF) | Represents a Design Web Format File (.dwf), which is a compressed file format for viewing, reviewing, or printing 2D/3D drawings. | +| [FBX](#FBX) | Represents an Autodesk FBX Interchange File (FilmBoX) (.fbx), which is a 3D model format. | +| [DWFX](#DWFX) | Represents a Design Web Format File XPS (.dwfx), which is a compressed format for viewing, reviewing, or printing 2D/3D drawings as an XPS document. | +| [DGN](#DGN) | Represents a MicroStation Design File (.dgn), which are drawings created and supported by CAD applications such as MicroStation and Intergraph Interactive Graphics Design System. | +| [PLT](#PLT) | Represents a PLT (HPGL) File (.plt), which is a vector-based plotter file introduced by Autodesk, Inc. | +| [CF2](#CF2) | Represents a Common File Format File (.cf2). | +| [OBJ](#OBJ) | Represents a Wavefront 3D Object File (.obj), which is a 3D image file introduced by Wavefront Technologies. | +| [HPG](#HPG) | Represents a PLT (HPGL) File (.hpg). | +| [IGS](#IGS) | Represents an Initial Graphics Exchange Specification (IGES) File (.igs). | +| [VSD](#VSD) | Represents a Visio Drawing File (.vsd), which are drawings created with Microsoft Visio application to represent a variety of graphical objects and their interconnections. | +| [VSDX](#VSDX) | Represents a Visio Drawing File (.vsdx), which represents the Microsoft Visio file format introduced from Microsoft Office 2013 onwards. | +| [VSS](#VSS) | Represents a Visio Stencil File (.vss), which are stencil files created with Microsoft Visio 2007 and earlier. | +| [VSSX](#VSSX) | Represents a Visio Stencil File (.vssx), which are drawing stencils created with Microsoft Visio 2013 and above. | +| [VSDM](#VSDM) | Represents a Visio Macro-Enabled Drawing (.vsdm), which are drawing files created with Microsoft Visio application that support macros. | +| [VST](#VST) | Represents a Visio Drawing Template (.vst), which are vector image files created with Microsoft Visio. | +| [VSTX](#VSTX) | Represents a Visio Drawing Template (.vstx), which are drawing template files created with Microsoft Visio 2013 and above. | +| [VSTM](#VSTM) | Represents a Visio Macro-Enabled Drawing Template (.vstm), which are template files created with Microsoft Visio that support macros. | +| [VSSM](#VSSM) | Represents a Visio Macro-Enabled Stencil File (.vssm), which are Microsoft Visio Stencil files that support macros. | +| [VSX](#VSX) | Represents a Visio Stencil XML File (.vsx), which refers to stencils consisting of drawings and shapes used for creating diagrams in Microsoft Visio. | +| [VTX](#VTX) | Represents a Visio Template XML File (.vtx), which is a Microsoft Visio drawing template saved to disk in XML file format. | +| [VDW](#VDW) | Represents a Visio Web Drawing (.vdw), which specifies the streams and storages required for rendering a web drawing. | +| [VDX](#VDX) | Represents a Visio Drawing XML File (.vdx), which represents any drawing or chart created in Microsoft Visio but saved in XML format with the .VDX extension. | +| [EPUB](#EPUB) | Represents an Open eBook File (.epub), which is an e-book file format that provides a standard digital publication format for publishers and consumers. | +| [MOBI](#MOBI) | Represents a Mobipocket eBook (.mobi), which is one of the most widely used ebook file formats. | +| [AZW_3](#AZW-3) | Amazon Kindle Format 8 (KF8) ebook is the digital file format developed for Amazon Kindle devices. | +| [MSG](#MSG) | Represents an Outlook Mail Message (.msg), which is a file format used by Microsoft Outlook and Exchange to store email messages, contacts, appointments, or other tasks. | +| [EML](#EML) | Represents an E-Mail Message (.eml), which represents email messages saved using Outlook and other relevant applications. | +| [EMLX](#EMLX) | Represents an Apple Mail Message (.emlx), which is implemented and developed by Apple. | +| [PST](#PST) | Represents an Outlook Personal Information Store File (.pst), which represents Outlook Personal Storage Files (also called Personal Storage Table) that store a variety of user information. | +| [OST](#OST) | Represents an Outlook Offline Data File (.ost), which represents a user's mailbox data in offline mode on a local machine upon registration with Exchange Server using Microsoft Outlook. | +| [TIF](#TIF) | Represents a Tagged Image File (.tif), which represents raster images that are meant for usage on a variety of devices that comply with this file format standard. | +| [TIFF](#TIFF) | Represents a Tagged Image File Format (.tiff), which represents raster images that are meant for usage on a variety of devices that comply with this file format standard. | +| [JPG](#JPG) | Represents a JPEG Image (.jpg), which is a type of image format that is saved using the method of lossy compression. | +| [JPEG](#JPEG) | Represents a JPEG Image (.jpeg), which is a type of image format that is saved using the method of lossy compression. | +| [PNG](#PNG) | Represents a Portable Network Graphic (.png), which is a type of raster image file format that uses lossless compression. | +| [GIF](#GIF) | Represents a Graphical Interchange Format File (.gif), which is a type of highly compressed image. | +| [APNG](#APNG) | Represents an Animated Portable Network Graphic (.apng), which is an extension of the PNG format that supports animation. | +| [BMP](#BMP) | Represents a Bitmap Image File (.bmp), which is used to store bitmap digital images. | +| [ICO](#ICO) | Represents an Icon File (.ico), which is an image file type used as an icon for the representation of an application on Microsoft Windows. | +| [TGA](#TGA) | Represents a Truevision TGA (TARGA) file, which is used to store bitmap digital images developed by TRUEVISION. | +| [JP_2](#JP-2) | Represents a JPEG 2000 Core Image File (.jp2), which is an image coding system and state-of-the-art image compression standard. | +| [JPF](#JPF) | Represents a JPEG 2000 Image File (.jpf). | +| [JPX](#JPX) | Represents a JPEG 2000 Image File (.jpx). | +| [JPM](#JPM) | Represents a JPEG 2000 Image File (.jpm). | +| [J2C](#J2C) | Represents a JPEG 2000 Code InputStream (.j2c). | +| [J2K](#J2K) | Represents a JPEG 2000 Code Stream (.j2k), which is an image compressed using wavelet compression instead of DCT compression. | +| [JPC](#JPC) | Represents a JPEG 2000 Code Stream (.jpc). | +| [JLS](#JLS) | Represents a JPEG-LS (JLS) file (.jls). | +| [DIB](#DIB) | Represents a Device Independent Bitmap File (.dib). | +| [WMF](#WMF) | Represents a Windows Metafile (.wmf), which represents Microsoft Windows Metafile (WMF) for storing vector as well as bitmap-format image data. | +| [WMZ](#WMZ) | Represents a Compressed Windows Metafile (.wmz), which represents Microsoft Windows Metafile (WMF) compressed in GZIP archive for storing vector as well as bitmap-format image data. | +| [EMF](#EMF) | Represents an Enhanced Windows Metafile (.emf), which represents graphical images device-independently. | +| [EMZ](#EMZ) | Represents a Windows Compressed Enhanced Metafile (.emz), which represents graphical images device-independently compressed by GZIP. | +| [WEBP](#WEBP) | Represents a WebP Image (.webp), which is a modern raster web image file format based on lossless and lossy compression. | +| [DNG](#DNG) | Represents a Digital Negative Specification (.dng), which is a digital camera image format used for the storage of raw files. | +| [CDR](#CDR) | Represents a CorelDraw Vector Graphic Drawing (.cdr), which is a vector drawing image file natively created with CorelDRAW for storing digitally encoded and compressed images. | +| [CMX](#CMX) | Represents a Corel Exchange (.cmx), which is a drawing image file that may contain vector graphics as well as bitmap graphics. | +| [DJVU](#DJVU) | Represents a DjVu Image (.djvu), which is a graphics file format intended for scanned documents and books, especially those containing a combination of text, drawings, images, and photographs. | +| [CGM](#CGM) | Represents a Computer Graphics Metafile (.cgm), which is a free, platform-independent, international standard metafile format for storing and exchanging vector graphics (2D), raster graphics, and text. | +| [PCL](#PCL) | Represents a Printer Command Language Document (.pcl). | +| [PSD](#PSD) | Represents an Adobe Photoshop Document (.psd), which is Adobe Photoshop's native file format used for graphics designing and development. | +| [PSB](#PSB) | Represents a Photoshop Large Document Format (.psb), which is used for graphics designing and development in Adobe Photoshop. | +| [DCM](#DCM) | Represents a DICOM Image (.dcm), which represents a digital image that stores medical information of patients such as MRIs, CT scans, and ultrasound images. | +| [PS](#PS) | Represents a PostScript File (.ps). | +| [EPS](#EPS) | Represents an Encapsulated PostScript File (.eps), which describes an Encapsulated PostScript language program that defines the appearance of a single page. | +| [ODG](#ODG) | Represents an OpenDocument Graphic File (.odg), which is used by Apache OpenOffice's Draw application to store drawing elements as a vector image. | +| [FODG](#FODG) | Represents a Flat XML ODF Template (.fodg), which is used by Apache OpenOffice's Draw application to store drawing elements as a vector image. | +| [SVG](#SVG) | Represents a Scalable Vector Graphics File (.svg), which is a Scalar Vector Graphics file that uses XML-based text format for describing the appearance of an image. | +| [SVGZ](#SVGZ) | Represents a Compressed Scalable Vector Graphics File (.svgz), which is a Scalar Vector Graphics file that uses XML-based text format, compressed by GZIP, for describing the appearance of an image. | +| [OTG](#OTG) | Represents an OpenDocument Graphic Template (.otg). | +| [HTM](#HTM) | Represents a Hypertext Markup Language File (.htm), which is the extension for web pages created for display in browsers. | +| [HTML](#HTML) | Represents a Hypertext Markup Language File (.html), which is the extension for web pages created for display in browsers. | +| [MHT](#MHT) | Represents an MHTML Web Archive (.mht). | +| [NSF](#NSF) | Represents a Lotus Notes Database (.nsf). | +| [MBOX](#MBOX) | Represents an Email Mailbox File (.mbox). | +| [MHTML](#MHTML) | Represents a MIME HTML File (.mhtml). | +| [XML](#XML) | Represents an XML File (.xml). | +| [ONE](#ONE) | Represents a OneNote Document (.one) created by Microsoft OneNote application. | +| [PDF](#PDF) | Represents a Portable Document Format File (.pdf), which is a type of document created by Adobe back in the 1990s. | +| [XPS](#XPS) | Represents an XML Paper Specification File (.xps), which represents page layout files based on XML Paper Specifications created by Microsoft. | +| [OXPS](#OXPS) | Represents an OpenXPS File (.oxps). | +| [TEX](#TEX) | Represents a LaTeX Source Document (.tex), which is a language that comprises programming as well as mark-up features used to typeset documents. | +| [PPT](#PPT) | Represents a PowerPoint Presentation (.ppt), which represents a PowerPoint file that consists of a collection of slides for displaying as a slideshow. | +| [PPTX](#PPTX) | Represents a PowerPoint Open XML Presentation (.pptx), which are presentation files created with the popular Microsoft PowerPoint application. | +| [PPS](#PPS) | Represents a PowerPoint Slide Show (.pps), which are created using Microsoft PowerPoint for Slide Show purposes. | +| [PPSX](#PPSX) | Represents a PowerPoint Open XML Slide Show (.ppsx) files, which are created using Microsoft PowerPoint 2007 and above for Slide Show purposes. | +| [ODP](#ODP) | Represents an OpenDocument Presentation (.odp), which represents a presentation file format used by OpenOffice.org in the OASISOpen standard. | +| [FODP](#FODP) | Represents an OpenDocument Presentation (.fodp), which represents OpenDocument Flat XML Presentation. | +| [POT](#POT) | Represents a PowerPoint Template (.pot), which represents Microsoft PowerPoint template files created by PowerPoint 97-2003 versions. | +| [PPTM](#PPTM) | Represents a PowerPoint Open XML Macro-Enabled Presentation (.pptm), which are macro-enabled presentation files created with Microsoft PowerPoint 2007 or higher versions. | +| [POTX](#POTX) | Represents a PowerPoint Open XML Presentation Template (.potx), which represents Microsoft PowerPoint template presentations created with Microsoft PowerPoint 2007 and above. | +| [POTM](#POTM) | Represents a PowerPoint Open XML Macro-Enabled Presentation Template (.potm), which are Microsoft PowerPoint template files with support for macros. | +| [PPSM](#PPSM) | Represents a PowerPoint Open XML Macro-Enabled Slide (.ppsm), which represents a macro-enabled slide show file format created with Microsoft PowerPoint 2007 or higher. | +| [OTP](#OTP) | Represents an OpenDocument Presentation Template (.otp), which represents presentation template files created by applications in the OASIS OpenDocument standard format. | +| [XLS](#XLS) | Represents an Excel Spreadsheet (.xls), which represents the Excel Binary File Format. | +| [EXCEL_2003_XML](#EXCEL-2003-XML) | Represents an Excel 2003 XML (SpreadsheetML) (.xml), which represents the Excel Binary File Format. | +| [NUMBERS](#NUMBERS) | Represents Apple Numbers (.numbers), which represents an Excel-like Binary File Format. | +| [XLSX](#XLSX) | Represents a Microsoft Excel Open XML Spreadsheet (.xlsx), which is a well-known format for Microsoft Excel documents that was introduced by Microsoft with the release of Microsoft Office 2007. | +| [XLSM](#XLSM) | Represents an Excel Open XML Macro-Enabled Spreadsheet (.xlsm), which is a type of spreadsheet file that supports macros. | +| [XLSB](#XLSB) | Represents an Excel Binary Spreadsheet (.xlsb), which specifies the Excel Binary File Format. | +| [CSV](#CSV) | Represents a Comma Separated Values File (.csv), which represents plain text files that contain records of data with comma-separated values. | +| [TSV](#TSV) | Represents a Tab Separated Values File (.tsv), which represents data separated with tabs in plain text format. | +| [ODS](#ODS) | Represents an OpenDocument Spreadsheet (.ods), which stands for OpenDocument Spreadsheet Document format that is editable by the user. | +| [FODS](#FODS) | Represents an OpenDocument Flat XML Spreadsheet (.fods). | +| [OTS](#OTS) | Represents an OpenDocument Spreadsheet Template (.ots). | +| [XLAM](#XLAM) | Represents a Microsoft Excel Add-in (.xlam). | +| [XLTM](#XLTM) | Represents a Microsoft Excel Macro-Enabled Template (.xltm), which represents files generated by Microsoft Excel as Macro-enabled template files. | +| [XLT](#XLT) | Represents a Microsoft Excel Template (.xlt), which are template files created with Microsoft Excel, a spreadsheet application that comes as part of the Microsoft Office suite. | +| [XLTX](#XLTX) | Represents an Excel Open XML Spreadsheet Template (.xltx), which represents Microsoft Excel Templates based on the Office OpenXML file format specifications. | +| [SXC](#SXC) | Represents a StarOffice Calc Spreadsheet (.sxc). | +| [MPP](#MPP) | Represents a Microsoft Project File (.mpp), which is a Microsoft Project data file that stores information related to project management in an integrated manner. | +| [MPT](#MPT) | Represents a Microsoft Project Template (.mpt), which contains basic information and structure along with document settings for creating .MPP files. | +| [MPX](#MPX) | Represents a Microsoft Project Exchange file (.mpx), which is an ASCII file format for transferring project information between Microsoft Project (MSP) and other applications that support the MPX file format, such as Primavera Project Planner, Sciforma, and Timerline Precision Estimating. | +| [AS](#AS) | Represents an ActionScript File (.as). | +| [AS_3](#AS-3) | Represents an ActionScript File (.as3). | +| [ASM](#ASM) | Represents an Assembly Language Source Code File (.asm). | +| [BAT](#BAT) | Represents a DOS Batch File (.bat). | +| [C](#C) | Represents a C/C++ Source Code File (.c). | +| [CC](#CC) | Represents a C++ Source Code File (.cc). | +| [CMAKE](#CMAKE) | Represents a CMake File (.cmake). | +| [CPP](#CPP) | Represents a C++ Source Code File (.cpp). | +| [CS](#CS) | Represents a C\# Source Code File (.cs), which is a source code file for the C\# programming language. | +| [VB](#VB) | Represents a Visual Basic Project Item File (.vb), which is a source code file created in the Visual Basic language. | +| [CSS](#CSS) | Represents a Cascading Style Sheet (.css) file. | +| [CXX](#CXX) | Represents a C++ Source Code File (.cxx). | +| [DIFF](#DIFF) | Represents a Patch File (.diff). | +| [ERB](#ERB) | Represents a Ruby ERB Script (.erb). | +| [GROOVY](#GROOVY) | Represents a Groovy Source Code File (.groovy). | +| [H](#H) | Represents a C/C++/Objective-C Header File (.h). | +| [HAML](#HAML) | Represents a Haml Source Code File (.haml). | +| [HH](#HH) | Represents a C++ Header File (.hh). | +| [JAVA](#JAVA) | Represents a Java Source Code File (.java). | +| [JS](#JS) | Represents a JavaScript File (.js). | +| [JSON](#JSON) | Represents a JavaScript Object Notation File (.json). | +| [LESS](#LESS) | Represents a LESS Style Sheet (.less) file. | +| [LOG](#LOG) | Represents a Log File (.log). | +| [M](#M) | Represents an Objective-C Implementation File (.m). | +| [MAKE](#MAKE) | Represents an Xcode Makefile Script (.make). | +| [MD](#MD) | Represents a Markdown Documentation File (.md). | +| [ML](#ML) | Represents an ML Source Code File (.ml). | +| [MM](#MM) | Represents an Objective-C++ Source File (.mm). | +| [PHP](#PHP) | Represents a PHP Source Code File (.php). | +| [PL](#PL) | Represents a Perl Script (.pl). | +| [PROPERTIES](#PROPERTIES) | Represents a Java Properties File (.properties). | +| [PY](#PY) | Represents a Python Script (.py). | +| [RB](#RB) | Represents a Ruby Source Code (.rb) file. | +| [RST](#RST) | Represents a reStructuredText File (.rst). | +| [SASS](#SASS) | Represents a Syntactically Awesome StyleSheets File (.sass). | +| [SCALA](#SCALA) | Represents a Scala Source Code File (.scala). | +| [SCM](#SCM) | Represents a Scheme Source Code File (.scm). | +| [SCRIPT](#SCRIPT) | Represents a Generic Script File (.script). | +| [SH](#SH) | Represents a Bash Shell Script (.sh). | +| [SML](#SML) | Represents a Standard ML Source Code File (.sml). | +| [SQL](#SQL) | Represents a Structured Query Language Data File (.sql). | +| [VIM](#VIM) | Represents a Vim Settings File (.vim). | +| [YAML](#YAML) | Represents a YAML Document (.yaml). | +| [DOC](#DOC) | Represents a Microsoft Word Document (.doc) file. | +| [DOCX](#DOCX) | Represents a Microsoft Word Open XML Document (.docx) file. | +| [CHM](#CHM) | Represents a Microsoft Compiled HTML Help File (.chm). | +| [DOCM](#DOCM) | Represents a Word Open XML Macro-Enabled Document (.docm) file. | +| [DOT](#DOT) | Represents a Word Document Template (.dot) file. | +| [DOTX](#DOTX) | Represents a Word Open XML Document Template (.dotx) file. | +| [DOTM](#DOTM) | Represents a Word Open XML Macro-Enabled Document Template (.dotm) file. | +| [RTF](#RTF) | Represents a Rich Text Format File (.rtf). | +| [TXT](#TXT) | Represents a Plain Text File (.txt). | +| [ODT](#ODT) | Represents an OpenDocument Text Document (.odt). | +| [OTT](#OTT) | Represents an OpenDocument Document Template (.ott). | +| [VCF](#VCF) | Represents a vCard File (.vcf), which is a digital file format for storing contact information. | +| [AI](#AI) | Represents an Adobe Illustrator file (.ai), which is a file format for Adobe Illustrator drawings. | +| [PSM1](#PSM1) | Represents a PowerShell script module file (.psm1). | +| [PS1](#PS1) | Represents a PowerShell script file (.ps1). | +| [PSD1](#PSD1) | Represents a PowerShell script module manifest file (.psd1). | +## Methods + +| Method | Description | +| --- | --- | +| [values()](#values--) | | +| [valueOf(String name)](#valueOf-java.lang.String-) | | +| [fromExtension(String extension)](#fromExtension-java.lang.String-) | Maps a file extension to a file type. | +| [fromFilePath(String filePath)](#fromFilePath-java.lang.String-) | Extracts the file extension from a file name or file path and maps it to a file type. | +| [fromMediaType(String mediaType)](#fromMediaType-java.lang.String-) | Maps a file media type to a file type. | +| [fromStream(InputStream stream)](#fromStream-java.io.InputStream-) | Detects the file type by reading the file signature. | +| [fromStream(InputStream stream, String password)](#fromStream-java.io.InputStream-java.lang.String-) | Detects the file type by reading the file signature. | +| [fromStream(InputStream stream, ILogger logger)](#fromStream-java.io.InputStream-com.groupdocs.foundation.logging.ILogger-) | Detects the file type by reading the file signature. | +| [fromStream(InputStream stream, String password, ILogger logger)](#fromStream-java.io.InputStream-java.lang.String-com.groupdocs.foundation.logging.ILogger-) | Detects the file type by reading the file signature. | +| [getSupportedFileTypes()](#getSupportedFileTypes--) | Retrieves the supported file types. | +| [detectCharset(String filePath)](#detectCharset-java.lang.String-) | Attempts to detect text [TXT](../../com.groupdocs.viewer/filetype\#TXT), [TSV](../../com.groupdocs.viewer/filetype\#TSV), and [CSV](../../com.groupdocs.viewer/filetype\#CSV) files charset by path. | +| [detectCharset(InputStream stream)](#detectCharset-java.io.InputStream-) | Attempts to detect text [TXT](../../com.groupdocs.viewer/filetype\#TXT), [TSV](../../com.groupdocs.viewer/filetype\#TSV), and [CSV](../../com.groupdocs.viewer/filetype\#CSV) file charset by stream. | +| [getFileFormat()](#getFileFormat--) | Gets the name of the file format, e.g., "Microsoft Word Document". | +| [getExtension()](#getExtension--) | Gets the file extension suffix (including the period "."), e.g., ".doc". | +| [toString()](#toString--) | Returns a string representation of the current object. | +### UNKNOWN {#UNKNOWN} +``` +public static final FileType UNKNOWN +``` + + +Represents an unknown file type. + +### ZIP {#ZIP} +``` +public static final FileType ZIP +``` + + +Represents a zipped file (.zip) that can hold one or more files or directories. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/compression/zip + +### TAR {#TAR} +``` +public static final FileType TAR +``` + + +Represents a consolidated Unix file archive (.tar) created for collecting one or more files. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/compression/tar + +### XZ {#XZ} +``` +public static final FileType XZ +``` + + +Represents an XZ file (.xz) compressed using a high-ratio compression algorithm based on the LZMA algorithm. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/xz + +### TXZ {#TXZ} +``` +public static final FileType TXZ +``` + + +Represents a consolidated Unix file archive (.txz, .tar.xz) created for collecting one or more files. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/txz + +### TARXZ {#TARXZ} +``` +public static final FileType TARXZ +``` + + +Represents a consolidated Unix file archive (.txz, .tar.xz) created for collecting one or more files. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/txz + +### TGZ {#TGZ} +``` +public static final FileType TGZ +``` + + +Represents a consolidated Unix file archive (.tgz, .tar.gz) created for collecting one or more files. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/tgz + +### TARGZ {#TARGZ} +``` +public static final FileType TARGZ +``` + + +Represents a consolidated Unix file archive (.tgz, .tar.gz) created for collecting one or more files. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/tgz + +### BZ_2 {#BZ-2} +``` +public static final FileType BZ_2 +``` + + +Represents a Bzip2 compressed file (.bz2) generated using the BZIP2 open-source compression method. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/compression/bz2 + +### RAR {#RAR} +``` +public static final FileType RAR +``` + + +Represents a Roshal Archive (.rar) compressed file generated using the RAR (WINRAR version 4) compression method. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/compression/rar + +### GZ {#GZ} +``` +public static final FileType GZ +``` + + +Represents a Gnu Zipped File (.gz) compressed file created with the gzip compression application. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/compression/gz + +### GZIP {#GZIP} +``` +public static final FileType GZIP +``` + + +Represents a Gnu Zipped File (.gzip) compressed file introduced as a free utility for replacing the Compress program used in Unix systems. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/compression/gz + +### SEVEN_ZIP {#SEVEN-ZIP} +``` +public static final FileType SEVEN_ZIP +``` + + +Represents a 7Zip (.7z, .7zip) file, which is a free open-source archiver with LZMA and LZMA2 compression. Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/compression/7z/ + +### CPIO {#CPIO} +``` +public static final FileType CPIO +``` + + +Cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/compression/cpio + +### DXF {#DXF} +``` +public static final FileType DXF +``` + + +Represents a Drawing Exchange Format File (.dxf), which is a tagged data representation of an AutoCAD drawing file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/dxf + +### DWG {#DWG} +``` +public static final FileType DWG +``` + + +Represents an AutoCAD Drawing Database File (.dwg), which represents proprietary binary files used for containing 2D and 3D design data. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/dwg + +### DWT {#DWT} +``` +public static final FileType DWT +``` + + +Represents an AutoCAD Drawing Template (.dwt), which is an AutoCAD drawing template file used as a starter for creating drawings that can be saved as DWG files. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/dwt + +### STL {#STL} +``` +public static final FileType STL +``` + + +Represents a Stereolithography File (.stl), which is an interchangeable file format that represents 3-dimensional surface geometry. It is commonly used in rapid prototyping, 3D printing, and computer-aided manufacturing. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/stl + +### IFC {#IFC} +``` +public static final FileType IFC +``` + + +Represents an Industry Foundation Classes File (.ifc), which is a file format that establishes international standards for importing and exporting building objects and their properties. It enables interoperability between different software applications. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/ifc + +### DWF {#DWF} +``` +public static final FileType DWF +``` + + +Represents a Design Web Format File (.dwf), which is a compressed file format for viewing, reviewing, or printing 2D/3D drawings. It contains graphics and text as part of the design data and reduces the file size due to compression. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/dwf + +### FBX {#FBX} +``` +public static final FileType FBX +``` + + +Represents an Autodesk FBX Interchange File (FilmBoX) (.fbx), which is a 3D model format. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/fbx + +### DWFX {#DWFX} +``` +public static final FileType DWFX +``` + + +Represents a Design Web Format File XPS (.dwfx), which is a compressed format for viewing, reviewing, or printing 2D/3D drawings as an XPS document. It contains graphics and text as part of the design data and reduces the file size due to compression. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/dwfx + +### DGN {#DGN} +``` +public static final FileType DGN +``` + + +Represents a MicroStation Design File (.dgn), which are drawings created and supported by CAD applications such as MicroStation and Intergraph Interactive Graphics Design System. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/dgn + +### PLT {#PLT} +``` +public static final FileType PLT +``` + + +Represents a PLT (HPGL) File (.plt), which is a vector-based plotter file introduced by Autodesk, Inc. It contains information for a certain CAD file, and all images are printed using lines instead of dots, ensuring accuracy and precision in production. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/cad/plt + +### CF2 {#CF2} +``` +public static final FileType CF2 +``` + + +Represents a Common File Format File (.cf2). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/cf2 + +### OBJ {#OBJ} +``` +public static final FileType OBJ +``` + + +Represents a Wavefront 3D Object File (.obj), which is a 3D image file introduced by Wavefront Technologies. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/3d/obj/ + +### HPG {#HPG} +``` +public static final FileType HPG +``` + + +Represents a PLT (HPGL) File (.hpg). It is a file format used for plotter files in the HP Graphics Language (HPGL). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/hpg + +### IGS {#IGS} +``` +public static final FileType IGS +``` + + +Represents an Initial Graphics Exchange Specification (IGES) File (.igs). + +### VSD {#VSD} +``` +public static final FileType VSD +``` + + +Represents a Visio Drawing File (.vsd), which are drawings created with Microsoft Visio application to represent a variety of graphical objects and their interconnections. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vsd + +### VSDX {#VSDX} +``` +public static final FileType VSDX +``` + + +Represents a Visio Drawing File (.vsdx), which represents the Microsoft Visio file format introduced from Microsoft Office 2013 onwards. It replaced the binary file format (.VSD) supported by earlier versions of Microsoft Visio. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vsdx + +### VSS {#VSS} +``` +public static final FileType VSS +``` + + +Represents a Visio Stencil File (.vss), which are stencil files created with Microsoft Visio 2007 and earlier. Stencil files provide drawing objects that can be included in a .VSD Visio drawing. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vss + +### VSSX {#VSSX} +``` +public static final FileType VSSX +``` + + +Represents a Visio Stencil File (.vssx), which are drawing stencils created with Microsoft Visio 2013 and above. The VSSX file format can be opened with Visio 2013 and above. Visio files are known for representing a variety of drawing elements such as shapes, connectors, flowcharts, network layout, UML diagrams, etc. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vssx + +### VSDM {#VSDM} +``` +public static final FileType VSDM +``` + + +Represents a Visio Macro-Enabled Drawing (.vsdm), which are drawing files created with Microsoft Visio application that support macros. VSDM files are OPC/XML drawings that are similar to VSDX, but also provide the capability to run macros when the file is opened. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vsdm + +### VST {#VST} +``` +public static final FileType VST +``` + + +Represents a Visio Drawing Template (.vst), which are vector image files created with Microsoft Visio. They act as templates for creating further files and contain the default layout and settings used for creating new Visio drawings. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vst + +### VSTX {#VSTX} +``` +public static final FileType VSTX +``` + + +Represents a Visio Drawing Template (.vstx), which are drawing template files created with Microsoft Visio 2013 and above. These VSTX files provide a starting point for creating Visio drawings saved as .VSDX files, with default layout and settings. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vstx + +### VSTM {#VSTM} +``` +public static final FileType VSTM +``` + + +Represents a Visio Macro-Enabled Drawing Template (.vstm), which are template files created with Microsoft Visio that support macros. Files created from VSTM templates can run macros developed in Visual Basic for Applications (VBA) code. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vstm + +### VSSM {#VSSM} +``` +public static final FileType VSSM +``` + + +Represents a Visio Macro-Enabled Stencil File (.vssm), which are Microsoft Visio Stencil files that support macros. When a VSSM file is opened, macros can be run to achieve desired formatting and placement of shapes in a diagram. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vssm + +### VSX {#VSX} +``` +public static final FileType VSX +``` + + +Represents a Visio Stencil XML File (.vsx), which refers to stencils consisting of drawings and shapes used for creating diagrams in Microsoft Visio. VSX files are saved in XML file format and were supported until Visio 2013. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vsx + +### VTX {#VTX} +``` +public static final FileType VTX +``` + + +Represents a Visio Template XML File (.vtx), which is a Microsoft Visio drawing template saved to disk in XML file format. The template provides basic settings for creating multiple Visio files with the same settings. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vtx + +### VDW {#VDW} +``` +public static final FileType VDW +``` + + +Represents a Visio Web Drawing (.vdw), which specifies the streams and storages required for rendering a web drawing. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/web/vdw + +### VDX {#VDX} +``` +public static final FileType VDX +``` + + +Represents a Visio Drawing XML File (.vdx), which represents any drawing or chart created in Microsoft Visio but saved in XML format with the .VDX extension. A Visio drawing XML file is created in the Visio software developed by Microsoft. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/vdx + +### EPUB {#EPUB} +``` +public static final FileType EPUB +``` + + +Represents an Open eBook File (.epub), which is an e-book file format that provides a standard digital publication format for publishers and consumers. The format is supported by many e-readers and software applications. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/ebook/epub + +### MOBI {#MOBI} +``` +public static final FileType MOBI +``` + + +Represents a Mobipocket eBook (.mobi), which is one of the most widely used ebook file formats. The format is an enhancement to the old OEB (Open Ebook Format) format and was used as a proprietary format for Mobipocket Reader. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/ebook/mobi + +### AZW_3 {#AZW-3} +``` +public static final FileType AZW_3 +``` + + +Amazon Kindle Format 8 (KF8) ebook is the digital file format developed for Amazon Kindle devices. The format is an enhancement to older AZW files and is used on Kindle Fire devices only with backward compatibility for the ancestor file format i.e. MOBI and AZW. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/ebook/azw3 + +### MSG {#MSG} +``` +public static final FileType MSG +``` + + +Represents an Outlook Mail Message (.msg), which is a file format used by Microsoft Outlook and Exchange to store email messages, contacts, appointments, or other tasks. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/email/msg + +### EML {#EML} +``` +public static final FileType EML +``` + + +Represents an E-Mail Message (.eml), which represents email messages saved using Outlook and other relevant applications. Almost all email clients support this file format due to its compliance with the RFC-822 Internet Message Format Standard. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/email/eml + +### EMLX {#EMLX} +``` +public static final FileType EMLX +``` + + +Represents an Apple Mail Message (.emlx), which is implemented and developed by Apple. The Apple Mail application uses the EMLX file format for exporting emails. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/email/emlx + +### PST {#PST} +``` +public static final FileType PST +``` + + +Represents an Outlook Personal Information Store File (.pst), which represents Outlook Personal Storage Files (also called Personal Storage Table) that store a variety of user information. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/email/pst + +### OST {#OST} +``` +public static final FileType OST +``` + + +Represents an Outlook Offline Data File (.ost), which represents a user's mailbox data in offline mode on a local machine upon registration with Exchange Server using Microsoft Outlook. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/email/ost + +### TIF {#TIF} +``` +public static final FileType TIF +``` + + +Represents a Tagged Image File (.tif), which represents raster images that are meant for usage on a variety of devices that comply with this file format standard. It is capable of describing bilevel, grayscale, palette-color, and full-color image data in several color spaces. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/tiff + +### TIFF {#TIFF} +``` +public static final FileType TIFF +``` + + +Represents a Tagged Image File Format (.tiff), which represents raster images that are meant for usage on a variety of devices that comply with this file format standard. It is capable of describing bilevel, grayscale, palette-color, and full-color image data in several color spaces. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/tiff + +### JPG {#JPG} +``` +public static final FileType JPG +``` + + +Represents a JPEG Image (.jpg), which is a type of image format that is saved using the method of lossy compression. The output image, as a result of compression, is a trade-off between storage size and image quality. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/jpeg + +### JPEG {#JPEG} +``` +public static final FileType JPEG +``` + + +Represents a JPEG Image (.jpeg), which is a type of image format that is saved using the method of lossy compression. The output image, as a result of compression, is a trade-off between storage size and image quality. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/jpeg + +### PNG {#PNG} +``` +public static final FileType PNG +``` + + +Represents a Portable Network Graphic (.png), which is a type of raster image file format that uses lossless compression. This file format was created as a replacement for the Graphics Interchange Format (GIF) and has no copyright limitations. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/png + +### GIF {#GIF} +``` +public static final FileType GIF +``` + + +Represents a Graphical Interchange Format File (.gif), which is a type of highly compressed image. For each image, GIF typically allows up to 8 bits per pixel, and up to 256 colors are allowed across the image. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/gif + +### APNG {#APNG} +``` +public static final FileType APNG +``` + + +Represents an Animated Portable Network Graphic (.apng), which is an extension of the PNG format that supports animation. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/apng + +### BMP {#BMP} +``` +public static final FileType BMP +``` + + +Represents a Bitmap Image File (.bmp), which is used to store bitmap digital images. These images are independent of the graphics adapter and are also called device independent bitmap (DIB) file format. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/bmp + +### ICO {#ICO} +``` +public static final FileType ICO +``` + + +Represents an Icon File (.ico), which is an image file type used as an icon for the representation of an application on Microsoft Windows. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/ico + +### TGA {#TGA} +``` +public static final FileType TGA +``` + + +Represents a Truevision TGA (TARGA) file, which is used to store bitmap digital images developed by TRUEVISION. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/tga + +### JP_2 {#JP-2} +``` +public static final FileType JP_2 +``` + + +Represents a JPEG 2000 Core Image File (.jp2), which is an image coding system and state-of-the-art image compression standard. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/jp2 + +### JPF {#JPF} +``` +public static final FileType JPF +``` + + +Represents a JPEG 2000 Image File (.jpf). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/image/jpf + +### JPX {#JPX} +``` +public static final FileType JPX +``` + + +Represents a JPEG 2000 Image File (.jpx). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/jpx + +### JPM {#JPM} +``` +public static final FileType JPM +``` + + +Represents a JPEG 2000 Image File (.jpm). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/jpm + +### J2C {#J2C} +``` +public static final FileType J2C +``` + + +Represents a JPEG 2000 Code InputStream (.j2c). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/j2c + +### J2K {#J2K} +``` +public static final FileType J2K +``` + + +Represents a JPEG 2000 Code Stream (.j2k), which is an image compressed using wavelet compression instead of DCT compression. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/j2k + +### JPC {#JPC} +``` +public static final FileType JPC +``` + + +Represents a JPEG 2000 Code Stream (.jpc). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/jpc + +### JLS {#JLS} +``` +public static final FileType JLS +``` + + +Represents a JPEG-LS (JLS) file (.jls). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/jls + +### DIB {#DIB} +``` +public static final FileType DIB +``` + + +Represents a Device Independent Bitmap File (.dib). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/dib + +### WMF {#WMF} +``` +public static final FileType WMF +``` + + +Represents a Windows Metafile (.wmf), which represents Microsoft Windows Metafile (WMF) for storing vector as well as bitmap-format image data. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/wmf + +### WMZ {#WMZ} +``` +public static final FileType WMZ +``` + + +Represents a Compressed Windows Metafile (.wmz), which represents Microsoft Windows Metafile (WMF) compressed in GZIP archive for storing vector as well as bitmap-format image data. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/wmz#compressed_windows_metafile + +### EMF {#EMF} +``` +public static final FileType EMF +``` + + +Represents an Enhanced Windows Metafile (.emf), which represents graphical images device-independently. Metafiles of EMF comprise variable-length records in chronological order that can render the stored image after parsing on any output device. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/emf + +### EMZ {#EMZ} +``` +public static final FileType EMZ +``` + + +Represents a Windows Compressed Enhanced Metafile (.emz), which represents graphical images device-independently compressed by GZIP. Metafiles of EMF comprise variable-length records in chronological order that can render the stored image after parsing on any output device. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/emz + +### WEBP {#WEBP} +``` +public static final FileType WEBP +``` + + +Represents a WebP Image (.webp), which is a modern raster web image file format based on lossless and lossy compression. It provides the same image quality while considerably reducing the image size. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/webp + +### DNG {#DNG} +``` +public static final FileType DNG +``` + + +Represents a Digital Negative Specification (.dng), which is a digital camera image format used for the storage of raw files. It was developed by Adobe in September 2004 and is primarily used for digital photography. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/dng + +### CDR {#CDR} +``` +public static final FileType CDR +``` + + +Represents a CorelDraw Vector Graphic Drawing (.cdr), which is a vector drawing image file natively created with CorelDRAW for storing digitally encoded and compressed images. A CDR drawing file contains text, lines, shapes, images, colors, and effects for vector representation of image contents. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/cdr + +### CMX {#CMX} +``` +public static final FileType CMX +``` + + +Represents a Corel Exchange (.cmx), which is a drawing image file that may contain vector graphics as well as bitmap graphics. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/cmx + +### DJVU {#DJVU} +``` +public static final FileType DJVU +``` + + +Represents a DjVu Image (.djvu), which is a graphics file format intended for scanned documents and books, especially those containing a combination of text, drawings, images, and photographs. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/djvu + +### CGM {#CGM} +``` +public static final FileType CGM +``` + + +Represents a Computer Graphics Metafile (.cgm), which is a free, platform-independent, international standard metafile format for storing and exchanging vector graphics (2D), raster graphics, and text. CGM uses an object-oriented approach and provides many functions for image production. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/cgm + +### PCL {#PCL} +``` +public static final FileType PCL +``` + + +Represents a Printer Command Language Document (.pcl). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/pcl + +### PSD {#PSD} +``` +public static final FileType PSD +``` + + +Represents an Adobe Photoshop Document (.psd), which is Adobe Photoshop's native file format used for graphics designing and development. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/psd + +### PSB {#PSB} +``` +public static final FileType PSB +``` + + +Represents a Photoshop Large Document Format (.psb), which is used for graphics designing and development in Adobe Photoshop. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/psb + +### DCM {#DCM} +``` +public static final FileType DCM +``` + + +Represents a DICOM Image (.dcm), which represents a digital image that stores medical information of patients such as MRIs, CT scans, and ultrasound images. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/dcm + +### PS {#PS} +``` +public static final FileType PS +``` + + +Represents a PostScript File (.ps). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/ps + +### EPS {#EPS} +``` +public static final FileType EPS +``` + + +Represents an Encapsulated PostScript File (.eps), which describes an Encapsulated PostScript language program that defines the appearance of a single page. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/eps + +### ODG {#ODG} +``` +public static final FileType ODG +``` + + +Represents an OpenDocument Graphic File (.odg), which is used by Apache OpenOffice's Draw application to store drawing elements as a vector image. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/odg + +### FODG {#FODG} +``` +public static final FileType FODG +``` + + +Represents a Flat XML ODF Template (.fodg), which is used by Apache OpenOffice's Draw application to store drawing elements as a vector image. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/image/fodg + +### SVG {#SVG} +``` +public static final FileType SVG +``` + + +Represents a Scalable Vector Graphics File (.svg), which is a Scalar Vector Graphics file that uses XML-based text format for describing the appearance of an image. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/svg + +### SVGZ {#SVGZ} +``` +public static final FileType SVGZ +``` + + +Represents a Compressed Scalable Vector Graphics File (.svgz), which 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 [here][]. + + +[here]: https://fileinfo.com/extension/svgz + +### OTG {#OTG} +``` +public static final FileType OTG +``` + + +Represents an OpenDocument Graphic Template (.otg). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/image/otg + +### HTM {#HTM} +``` +public static final FileType HTM +``` + + +Represents a Hypertext Markup Language File (.htm), which is the extension for web pages created for display in browsers. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/web/html + +### HTML {#HTML} +``` +public static final FileType HTML +``` + + +Represents a Hypertext Markup Language File (.html), which is the extension for web pages created for display in browsers. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/web/html + +### MHT {#MHT} +``` +public static final FileType MHT +``` + + +Represents an MHTML Web Archive (.mht). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/web/mht + +### NSF {#NSF} +``` +public static final FileType NSF +``` + + +Represents a Lotus Notes Database (.nsf). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/nsf + +### MBOX {#MBOX} +``` +public static final FileType MBOX +``` + + +Represents an Email Mailbox File (.mbox). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/mbox + +### MHTML {#MHTML} +``` +public static final FileType MHTML +``` + + +Represents a MIME HTML File (.mhtml). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/web/mhtml + +### XML {#XML} +``` +public static final FileType XML +``` + + +Represents an XML File (.xml). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/web/xml + +### ONE {#ONE} +``` +public static final FileType ONE +``` + + +Represents a OneNote Document (.one) created by Microsoft OneNote application. OneNote lets you gather information using the application as if you are using your draftpad for taking notes. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/note-taking/one + +### PDF {#PDF} +``` +public static final FileType PDF +``` + + +Represents a Portable Document Format File (.pdf), which is a type of document created by Adobe back in the 1990s. The purpose of this file format was to introduce a standard for the representation of documents and other reference material in a format that is independent of application software, hardware, and operating systems. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/view/pdf + +### XPS {#XPS} +``` +public static final FileType XPS +``` + + +Represents an XML Paper Specification File (.xps), which represents page layout files based on XML Paper Specifications created by Microsoft. This format was developed by Microsoft as a replacement for the EMF file format and is similar to the PDF file format, but uses XML in the layout, appearance, and printing information of a document. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/xps + +### OXPS {#OXPS} +``` +public static final FileType OXPS +``` + + +Represents an OpenXPS File (.oxps). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/oxps + +### TEX {#TEX} +``` +public static final FileType TEX +``` + + +Represents a LaTeX Source Document (.tex), which is a language that comprises programming as well as mark-up features used to typeset documents. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/page-description-language/tex + +### PPT {#PPT} +``` +public static final FileType PPT +``` + + +Represents a PowerPoint Presentation (.ppt), which represents a PowerPoint file that consists of a collection of slides for displaying as a slideshow. It specifies the Binary File Format used by Microsoft PowerPoint 97-2003. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/ppt + +### PPTX {#PPTX} +``` +public static final FileType PPTX +``` + + +Represents a PowerPoint Open XML Presentation (.pptx), which are presentation files created with the popular Microsoft PowerPoint application. Unlike the previous version of the presentation file format PPT, which was binary, the PPTX format is based on the Microsoft PowerPoint Open XML presentation file format. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/pptx + +### PPS {#PPS} +``` +public static final FileType PPS +``` + + +Represents a PowerPoint Slide Show (.pps), which are created using Microsoft PowerPoint for Slide Show purposes. PPS file reading and creation are supported by Microsoft PowerPoint 97-2003. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/pps + +### PPSX {#PPSX} +``` +public static final FileType PPSX +``` + + +Represents a PowerPoint Open XML Slide Show (.ppsx) files, which are created using Microsoft PowerPoint 2007 and above for Slide Show purposes. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/ppsx + +### ODP {#ODP} +``` +public static final FileType ODP +``` + + +Represents an OpenDocument Presentation (.odp), which represents a presentation file format used by OpenOffice.org in the OASISOpen standard. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/odp + +### FODP {#FODP} +``` +public static final FileType FODP +``` + + +Represents an OpenDocument Presentation (.fodp), which represents OpenDocument Flat XML Presentation. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/fodp + +### POT {#POT} +``` +public static final FileType POT +``` + + +Represents a PowerPoint Template (.pot), which represents Microsoft PowerPoint template files created by PowerPoint 97-2003 versions. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/pot + +### PPTM {#PPTM} +``` +public static final FileType PPTM +``` + + +Represents a PowerPoint Open XML Macro-Enabled Presentation (.pptm), which are macro-enabled presentation files created with Microsoft PowerPoint 2007 or higher versions. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/pptm + +### POTX {#POTX} +``` +public static final FileType POTX +``` + + +Represents a PowerPoint Open XML Presentation Template (.potx), which represents Microsoft PowerPoint template presentations created with Microsoft PowerPoint 2007 and above. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/potx + +### POTM {#POTM} +``` +public static final FileType POTM +``` + + +Represents a PowerPoint Open XML Macro-Enabled Presentation Template (.potm), which are Microsoft PowerPoint template files with support for macros. POTM files are created with PowerPoint 2007 or above and contain default settings that can be used to create further presentation files. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/potm + +### PPSM {#PPSM} +``` +public static final FileType PPSM +``` + + +Represents a PowerPoint Open XML Macro-Enabled Slide (.ppsm), which represents a macro-enabled slide show file format created with Microsoft PowerPoint 2007 or higher. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/ppsm + +### OTP {#OTP} +``` +public static final FileType OTP +``` + + +Represents an OpenDocument Presentation Template (.otp), which represents presentation template files created by applications in the OASIS OpenDocument standard format. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/presentation/otp + +### XLS {#XLS} +``` +public static final FileType XLS +``` + + +Represents an Excel Spreadsheet (.xls), which represents the 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. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xls + +### EXCEL_2003_XML {#EXCEL-2003-XML} +``` +public static final FileType EXCEL_2003_XML +``` + + +Represents an Excel 2003 XML (SpreadsheetML) (.xml), which represents the 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. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xls + +### NUMBERS {#NUMBERS} +``` +public static final FileType NUMBERS +``` + + +Represents Apple Numbers (.numbers), which represents an Excel-like Binary File Format. Such files can be created by Apple Numbers application. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/numbers + +### XLSX {#XLSX} +``` +public static final FileType XLSX +``` + + +Represents a Microsoft Excel Open XML Spreadsheet (.xlsx), which is a well-known format for Microsoft Excel documents that was introduced by Microsoft with the release of Microsoft Office 2007. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xlsx + +### XLSM {#XLSM} +``` +public static final FileType XLSM +``` + + +Represents an Excel Open XML Macro-Enabled Spreadsheet (.xlsm), which is a type of spreadsheet file that supports macros. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xlsm + +### XLSB {#XLSB} +``` +public static final FileType XLSB +``` + + +Represents an Excel Binary Spreadsheet (.xlsb), which specifies the Excel Binary File Format. It is a collection of records and structures that specify Excel workbook content. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xlsb + +### CSV {#CSV} +``` +public static final FileType CSV +``` + + +Represents a Comma Separated Values File (.csv), which represents plain text files that contain records of data with comma-separated values. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/csv + +### TSV {#TSV} +``` +public static final FileType TSV +``` + + +Represents a Tab Separated Values File (.tsv), which represents data separated with tabs in plain text format. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/tsv + +### ODS {#ODS} +``` +public static final FileType ODS +``` + + +Represents an OpenDocument Spreadsheet (.ods), which stands for OpenDocument Spreadsheet Document format that is editable by the user. Data is stored inside ODF files in rows and columns. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/ods + +### FODS {#FODS} +``` +public static final FileType FODS +``` + + +Represents an OpenDocument Flat XML Spreadsheet (.fods). It is a spreadsheet document format based on XML used by OpenOffice and LibreOffice. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/fods + +### OTS {#OTS} +``` +public static final FileType OTS +``` + + +Represents an OpenDocument Spreadsheet Template (.ots). It is a template document format used by OpenOffice and LibreOffice for spreadsheets. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/ots + +### XLAM {#XLAM} +``` +public static final FileType XLAM +``` + + +Represents a Microsoft Excel Add-in (.xlam). It is a file format used by Microsoft Excel to create add-ins with custom functionality. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/xlam + +### XLTM {#XLTM} +``` +public static final FileType XLTM +``` + + +Represents a Microsoft Excel Macro-Enabled Template (.xltm), which represents files generated by Microsoft Excel as Macro-enabled template files. XLTM files are similar to XLTX in structure except that the latter doesn't support creating template files with macros. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xltm + +### XLT {#XLT} +``` +public static final FileType XLT +``` + + +Represents a Microsoft Excel Template (.xlt), which are template files created with Microsoft Excel, a spreadsheet application that comes as part of the Microsoft Office suite. Microsoft Office 97-2003 supported creating new XLT files as well as opening them. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xlt + +### XLTX {#XLTX} +``` +public static final FileType XLTX +``` + + +Represents an Excel Open XML Spreadsheet Template (.xltx), which represents Microsoft Excel Templates based on the Office OpenXML file format specifications. It is used to create a standard template file that can be utilized to generate XLSX files with the same settings specified in the XLTX file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/xltx + +### SXC {#SXC} +``` +public static final FileType SXC +``` + + +Represents a StarOffice Calc Spreadsheet (.sxc). It is a spreadsheet document created with StarOffice Calc, a spreadsheet program. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/spreadsheet/sxc + +### MPP {#MPP} +``` +public static final FileType MPP +``` + + +Represents a Microsoft Project File (.mpp), which is a Microsoft Project data file that stores information related to project management in an integrated manner. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/project-management/mpp + +### MPT {#MPT} +``` +public static final FileType MPT +``` + + +Represents a Microsoft Project Template (.mpt), which contains basic information and structure along with document settings for creating .MPP files. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/project-management/mpt + +### MPX {#MPX} +``` +public static final FileType MPX +``` + + +Represents a Microsoft Project Exchange file (.mpx), which is an ASCII file format for transferring project information between Microsoft Project (MSP) and other applications that support the MPX file format, such as Primavera Project Planner, Sciforma, and Timerline Precision Estimating. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/project-management/mpx + +### AS {#AS} +``` +public static final FileType AS +``` + + +Represents an ActionScript File (.as). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/as + +### AS_3 {#AS-3} +``` +public static final FileType AS_3 +``` + + +Represents an ActionScript File (.as3). Learn more about this file format [here][]. + + +[here]: https://datatypes.net/open-as3-files + +### ASM {#ASM} +``` +public static final FileType ASM +``` + + +Represents an Assembly Language Source Code File (.asm). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/cad/asm + +### BAT {#BAT} +``` +public static final FileType BAT +``` + + +Represents a DOS Batch File (.bat). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/executable/bat + +### C {#C} +``` +public static final FileType C +``` + + +Represents a C/C++ Source Code File (.c). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/c + +### CC {#CC} +``` +public static final FileType CC +``` + + +Represents a C++ Source Code File (.cc). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/cc + +### CMAKE {#CMAKE} +``` +public static final FileType CMAKE +``` + + +Represents a CMake File (.cmake). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/cmake + +### CPP {#CPP} +``` +public static final FileType CPP +``` + + +Represents a C++ Source Code File (.cpp). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/cpp + +### CS {#CS} +``` +public static final FileType CS +``` + + +Represents a C\# Source Code File (.cs), which is a source code file for the C\# programming language. It was introduced by Microsoft for use with the .NET Framework. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/cs + +### VB {#VB} +``` +public static final FileType VB +``` + + +Represents a Visual Basic Project Item File (.vb), which is a source code file created in the Visual Basic language. It was created by Microsoft for the development of .NET applications. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/vb + +### CSS {#CSS} +``` +public static final FileType CSS +``` + + +Represents a Cascading Style Sheet (.css) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/web/css + +### CXX {#CXX} +``` +public static final FileType CXX +``` + + +Represents a C++ Source Code File (.cxx). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/cxx + +### DIFF {#DIFF} +``` +public static final FileType DIFF +``` + + +Represents a Patch File (.diff). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/diff + +### ERB {#ERB} +``` +public static final FileType ERB +``` + + +Represents a Ruby ERB Script (.erb). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/erb + +### GROOVY {#GROOVY} +``` +public static final FileType GROOVY +``` + + +Represents a Groovy Source Code File (.groovy). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/groovy + +### H {#H} +``` +public static final FileType H +``` + + +Represents a C/C++/Objective-C Header File (.h). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/h + +### HAML {#HAML} +``` +public static final FileType HAML +``` + + +Represents a Haml Source Code File (.haml). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/haml + +### HH {#HH} +``` +public static final FileType HH +``` + + +Represents a C++ Header File (.hh). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/hh + +### JAVA {#JAVA} +``` +public static final FileType JAVA +``` + + +Represents a Java Source Code File (.java). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/java + +### JS {#JS} +``` +public static final FileType JS +``` + + +Represents a JavaScript File (.js). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/web/js + +### JSON {#JSON} +``` +public static final FileType JSON +``` + + +Represents a JavaScript Object Notation File (.json). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/web/json + +### LESS {#LESS} +``` +public static final FileType LESS +``` + + +Represents a LESS Style Sheet (.less) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/web/less + +### LOG {#LOG} +``` +public static final FileType LOG +``` + + +Represents a Log File (.log). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/database/log + +### M {#M} +``` +public static final FileType M +``` + + +Represents an Objective-C Implementation File (.m). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/m + +### MAKE {#MAKE} +``` +public static final FileType MAKE +``` + + +Represents an Xcode Makefile Script (.make). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/make + +### MD {#MD} +``` +public static final FileType MD +``` + + +Represents a Markdown Documentation File (.md). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/word-processing/md + +### ML {#ML} +``` +public static final FileType ML +``` + + +Represents an ML Source Code File (.ml). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/ml + +### MM {#MM} +``` +public static final FileType MM +``` + + +Represents an Objective-C++ Source File (.mm). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/mm + +### PHP {#PHP} +``` +public static final FileType PHP +``` + + +Represents a PHP Source Code File (.php). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/programming/php + +### PL {#PL} +``` +public static final FileType PL +``` + + +Represents a Perl Script (.pl). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/pl + +### PROPERTIES {#PROPERTIES} +``` +public static final FileType PROPERTIES +``` + + +Represents a Java Properties File (.properties). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/properties + +### PY {#PY} +``` +public static final FileType PY +``` + + +Represents a Python Script (.py). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/py + +### RB {#RB} +``` +public static final FileType RB +``` + + +Represents a Ruby Source Code (.rb) file. Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/rb + +### RST {#RST} +``` +public static final FileType RST +``` + + +Represents a reStructuredText File (.rst). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/rst + +### SASS {#SASS} +``` +public static final FileType SASS +``` + + +Represents a Syntactically Awesome StyleSheets File (.sass). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/web/sass + +### SCALA {#SCALA} +``` +public static final FileType SCALA +``` + + +Represents a Scala Source Code File (.scala). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/scala + +### SCM {#SCM} +``` +public static final FileType SCM +``` + + +Represents a Scheme Source Code File (.scm). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/scm + +### SCRIPT {#SCRIPT} +``` +public static final FileType SCRIPT +``` + + +Represents a Generic Script File (.script). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/script + +### SH {#SH} +``` +public static final FileType SH +``` + + +Represents a Bash Shell Script (.sh). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/cs/programming/sh + +### SML {#SML} +``` +public static final FileType SML +``` + + +Represents a Standard ML Source Code File (.sml). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/sml + +### SQL {#SQL} +``` +public static final FileType SQL +``` + + +Represents a Structured Query Language Data File (.sql). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/database/sql + +### VIM {#VIM} +``` +public static final FileType VIM +``` + + +Represents a Vim Settings File (.vim). Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/vim + +### YAML {#YAML} +``` +public static final FileType YAML +``` + + +Represents a YAML Document (.yaml). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/programming/yaml + +### DOC {#DOC} +``` +public static final FileType DOC +``` + + +Represents a Microsoft Word Document (.doc) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/doc + +### DOCX {#DOCX} +``` +public static final FileType DOCX +``` + + +Represents a Microsoft Word Open XML Document (.docx) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/docx + +### CHM {#CHM} +``` +public static final FileType CHM +``` + + +Represents a Microsoft Compiled HTML Help File (.chm). Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/web/chm + +### DOCM {#DOCM} +``` +public static final FileType DOCM +``` + + +Represents a Word Open XML Macro-Enabled Document (.docm) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/docm + +### DOT {#DOT} +``` +public static final FileType DOT +``` + + +Represents a Word Document Template (.dot) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/dot + +### DOTX {#DOTX} +``` +public static final FileType DOTX +``` + + +Represents a Word Open XML Document Template (.dotx) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/dotx + +### DOTM {#DOTM} +``` +public static final FileType DOTM +``` + + +Represents a Word Open XML Macro-Enabled Document Template (.dotm) file. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/dotm + +### RTF {#RTF} +``` +public static final FileType RTF +``` + + +Represents a Rich Text Format File (.rtf). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/rtf + +### TXT {#TXT} +``` +public static final FileType TXT +``` + + +Represents a Plain Text File (.txt). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/txt + +### ODT {#ODT} +``` +public static final FileType ODT +``` + + +Represents an OpenDocument Text Document (.odt). Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/odt + +### OTT {#OTT} +``` +public static final FileType OTT +``` + + +Represents an OpenDocument Document Template (.ott). It is a template document generated in compliance with the OASIS' OpenDocument standard format. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/word-processing/ott + +### VCF {#VCF} +``` +public static final FileType VCF +``` + + +Represents a vCard File (.vcf), which is a digital file format for storing contact information. It is widely used for data interchange among popular information exchange applications. Learn more about this file format [here][]. + + +[here]: https://wiki.fileformat.com/email/vcf + +### AI {#AI} +``` +public static final FileType AI +``` + + +Represents an Adobe Illustrator file (.ai), which is a file format for Adobe Illustrator drawings. Learn more about this file format [here][]. + + +[here]: https://docs.fileformat.com/image/ai + +### PSM1 {#PSM1} +``` +public static final FileType PSM1 +``` + + +Represents a PowerShell script module file (.psm1). It is a file format for PowerShell module scripts. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/psm1 + +### PS1 {#PS1} +``` +public static final FileType PS1 +``` + + +Represents a PowerShell script file (.ps1). It is a file format for Windows PowerShell Cmdlet files. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/ps1 + +### PSD1 {#PSD1} +``` +public static final FileType PSD1 +``` + + +Represents a PowerShell script module manifest file (.psd1). It is a file format for PowerShell module manifest scripts. Learn more about this file format [here][]. + + +[here]: https://fileinfo.com/extension/psd1 + +### values() {#values--} +``` +public static FileType[] values() +``` + + + + +**Returns:** +com.groupdocs.viewer.FileType[] +### valueOf(String name) {#valueOf-java.lang.String-} +``` +public static FileType valueOf(String name) +``` + + + + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| name | java.lang.String | | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) +### fromExtension(String extension) {#fromExtension-java.lang.String-} +``` +public static FileType fromExtension(String extension) +``` + + +Maps a file extension to a file type. + +This method takes a file extension, with or without the period ".", and returns the corresponding file type if it is supported. If the file type is not supported, it returns the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| extension | java.lang.String | The file extension with or without the period ".". | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the corresponding file type if supported, otherwise the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. +### fromFilePath(String filePath) {#fromFilePath-java.lang.String-} +``` +public static FileType fromFilePath(String filePath) +``` + + +Extracts the file extension from a file name or file path and maps it to a file type. + +If the file type is supported, the method returns the corresponding FileType , otherwise it returns the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.lang.String | The file name or file path. | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the corresponding file type if supported, otherwise the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. +### fromMediaType(String mediaType) {#fromMediaType-java.lang.String-} +``` +public static FileType fromMediaType(String mediaType) +``` + + +Maps a file media type to a file type. For example, 'application/pdf' will be mapped to [PDF](../../com.groupdocs.viewer/filetype\#PDF). + +This method takes a file media type as input and maps it to the corresponding FileType . If the media type is supported, the method returns the corresponding file type. If the media type is not supported, it returns the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| mediaType | java.lang.String | The file media type, e.g., 'application/pdf'. | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the corresponding file type if found, otherwise the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. +### fromStream(InputStream stream) {#fromStream-java.io.InputStream-} +``` +public static FileType fromStream(InputStream stream) +``` + + +Detects the file type by reading the file signature. + +This method takes an input stream representing a file and tries to detect its file type by analyzing the file signature. The file signature is a unique sequence of bytes at the beginning of the file that indicates its file type. The method reads the file signature from the input stream and matches it against known file signatures of supported file types. If a match is found, the method returns the corresponding file type. If no match is found, it returns the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| stream | java.io.InputStream | The input stream representing the file. | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the detected file type if successful, otherwise the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. +### fromStream(InputStream stream, String password) {#fromStream-java.io.InputStream-java.lang.String-} +``` +public static FileType fromStream(InputStream stream, String password) +``` + + +Detects the file type by reading the file signature. + +This method analyzes the file signature, which is a unique sequence of bytes at the beginning of the file, to determine the file type. It reads the file signature from the provided input stream and matches it against known file signatures of supported file types. If a match is found, the method returns the corresponding file type. If no match is found, it returns the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. + +If the file is encrypted and requires a password to open, the password should be provided as a parameter to this method. The password will be used to decrypt the file and analyze its signature for determining the file type. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| stream | java.io.InputStream | The input stream representing the file. | +| password | java.lang.String | The password to open the file. | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the detected file type if successful, otherwise the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. +### fromStream(InputStream stream, ILogger logger) {#fromStream-java.io.InputStream-com.groupdocs.foundation.logging.ILogger-} +``` +public static FileType fromStream(InputStream stream, ILogger logger) +``` + + +Detects the file type by reading the file signature. + +This method analyzes the file signature, which is a unique sequence of bytes at the beginning of the file, to determine the file type. It reads the file signature from the provided input stream and matches it against known file signatures of supported file types. If a match is found, the method returns the corresponding file type. If no match is found, it returns the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. + +A logger can be provided to log any relevant information or errors during the file type detection process. The logger should implement the ILogger interface. If no logger is provided, the detection process will not produce any log output. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| stream | java.io.InputStream | The input stream representing the file. | +| logger | com.groupdocs.foundation.logging.ILogger | The logger for logging information or errors. | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the detected file type if successful, otherwise the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. +### fromStream(InputStream stream, String password, ILogger logger) {#fromStream-java.io.InputStream-java.lang.String-com.groupdocs.foundation.logging.ILogger-} +``` +public static FileType fromStream(InputStream stream, String password, ILogger logger) +``` + + +Detects the file type by reading the file signature. + +This method analyzes the file signature, which is a unique sequence of bytes at the beginning of the file, to determine the file type. It reads the file signature from the provided input stream and matches it against known file signatures of supported file types. If a match is found, the method returns the corresponding file type. If no match is found, it returns the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. + +A password can be provided if the file is encrypted or protected. The password will be used to open the file before analyzing the file signature. If the file does not require a password, this parameter can be set to null. + +A logger can be provided to log any relevant information or errors during the file type detection process. The logger should implement the ILogger interface. If no logger is provided, the detection process will not produce any log output. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| stream | java.io.InputStream | The input stream representing the file. | +| password | java.lang.String | The password to open the file. | +| logger | com.groupdocs.foundation.logging.ILogger | The logger for logging information or errors. | + +**Returns:** +[FileType](../../com.groupdocs.viewer/filetype) - the detected file type if successful, otherwise the default [UNKNOWN](../../com.groupdocs.viewer/filetype\#UNKNOWN) file type. +### getSupportedFileTypes() {#getSupportedFileTypes--} +``` +public static List getSupportedFileTypes() +``` + + +Retrieves the supported file types. + +This method returns a sequence of all the supported file types by the system. The file types represent various document formats that can be processed or recognized by the system. + + **Learn more** + + * Learn more about the supported document formats: [Full list of supported file formats][] + + +[Full list of supported file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/ + +**Returns:** +java.util.List - a sequence of supported file types. +### detectCharset(String filePath) {#detectCharset-java.lang.String-} +``` +public static Charset detectCharset(String filePath) +``` + + +Attempts to detect text [TXT](../../com.groupdocs.viewer/filetype\#TXT), [TSV](../../com.groupdocs.viewer/filetype\#TSV), and [CSV](../../com.groupdocs.viewer/filetype\#CSV) files charset by path. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.lang.String | The file name or file path. | + +**Returns:** +java.nio.charset.Charset - Charset or null when fails to detect a file charset. + +**Example:** + +``` +Charset charset = FileType.detectCharset("message.txt"); +``` +### detectCharset(InputStream stream) {#detectCharset-java.io.InputStream-} +``` +public static Charset detectCharset(InputStream stream) +``` + + +Attempts to detect text [TXT](../../com.groupdocs.viewer/filetype\#TXT), [TSV](../../com.groupdocs.viewer/filetype\#TSV), and [CSV](../../com.groupdocs.viewer/filetype\#CSV) file charset by stream. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| stream | java.io.InputStream | The file stream. | + +**Returns:** +java.nio.charset.Charset - Charset or null when fails to detect a file charset. + +**Example:** + +``` +InputStream stream = new FileInputStream("message.txt"); + Charset charset = FileType.detectCharset(stream); +``` +### getFileFormat() {#getFileFormat--} +``` +public final String getFileFormat() +``` + + +Gets the name of the file format, e.g., "Microsoft Word Document". + +**Returns:** +java.lang.String - the name of the file format. +### getExtension() {#getExtension--} +``` +public final String getExtension() +``` + + +Gets the file extension suffix (including the period "."), e.g., ".doc". + +**Returns:** +java.lang.String - the file extension suffix. +### toString() {#toString--} +``` +public String toString() +``` + + +Returns a string representation of the current object. + +**Returns:** +java.lang.String - a string representation of the current object. diff --git a/english/nodejs-java/com.groupdocs.viewer/license/_index.md b/english/nodejs-java/com.groupdocs.viewer/license/_index.md new file mode 100644 index 00000000..ebd8da44 --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer/license/_index.md @@ -0,0 +1,142 @@ +--- +title: License +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides methods to license the component and unlock its full functionality. +type: docs +weight: 10 +url: /nodejs-java/com.groupdocs.viewer/license/ +--- +**Inheritance:** +java.lang.Object +``` +public class License +``` + +Provides methods to license the component and unlock its full functionality. + +The License class allows you to apply a valid license to the GroupDocs.Viewer component, enabling you to utilize all the features and remove any evaluation limitations. + +Example usage: + +``` + + License license = new License(); + license.setLicense("path/to/license/file.lic"); + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [License()](#License--) | | +## Methods + +| Method | Description | +| --- | --- | +| [resetLicense()](#resetLicense--) | | +| [setLicense(InputStream licenseStream)](#setLicense-java.io.InputStream-) | Licenses the component. | +| [setLicense(Path licensePath)](#setLicense-java.nio.file.Path-) | Licenses the component. | +| [setLicense(String licensePath)](#setLicense-java.lang.String-) | Licenses the component. | +| [setLicense(URL licenseUri)](#setLicense-java.net.URL-) | Licenses the component. | +### License() {#License--} +``` +public License() +``` + + +### resetLicense() {#resetLicense--} +``` +public static void resetLicense() +``` + + + + +### setLicense(InputStream licenseStream) {#setLicense-java.io.InputStream-} +``` +public final void setLicense(InputStream licenseStream) +``` + + +Licenses the component. + +The following example demonstrates how to set a license passing InputStream of the license file. + +For more information about licensing, please refer to the [GroupDocs Licensing FAQ][]. You can also find detailed information about GroupDocs.Viewer licensing in the [Evaluation Limitations and Licensing][] documentation. + +**Example:** + +``` + + FileInputStream licenseStream = new FileInputStream("LicenseFile.lic"); + License license = new License(); + license.setLicense(licenseStream); + +``` + + +[GroupDocs Licensing FAQ]: https://purchase.groupdocs.com/faqs/licensing +[Evaluation Limitations and Licensing]: https://docs.groupdocs.com/display/viewernet/Evaluation+Limitations+and+Licensing+of+GroupDocs.Viewer + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| licenseStream | java.io.InputStream | The license stream. | + +### setLicense(Path licensePath) {#setLicense-java.nio.file.Path-} +``` +public final void setLicense(Path licensePath) +``` + + +Licenses the component. + +Sets the license for the component using the specified license path. + +**Note:** This method should be called before using any functionality of the component. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| licensePath | java.nio.file.Path | The license path. | + +### setLicense(String licensePath) {#setLicense-java.lang.String-} +``` +public final void setLicense(String licensePath) +``` + + +Licenses the component. + +This method should be called before using any functionality. + +Example usage: + +``` + + String licensePath = "GroupDocs.Viewer.lic"; + License license = new License(); + license.setLicense(licensePath); + +``` + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| licensePath | java.lang.String | The license path or url. | + +### setLicense(URL licenseUri) {#setLicense-java.net.URL-} +``` +public void setLicense(URL licenseUri) +``` + + +Licenses the component. + +This method should be called before using any functionality. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| licenseUri | java.net.URL | The license URI. | + diff --git a/english/nodejs-java/com.groupdocs.viewer/metered/_index.md b/english/nodejs-java/com.groupdocs.viewer/metered/_index.md new file mode 100644 index 00000000..083174ef --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer/metered/_index.md @@ -0,0 +1,121 @@ +--- +title: Metered +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Provides methods for applying metered license to the GroupDocs.Viewer component. +type: docs +weight: 11 +url: /nodejs-java/com.groupdocs.viewer/metered/ +--- +**Inheritance:** +java.lang.Object +``` +public class Metered +``` + +Provides methods for applying metered license to the GroupDocs.Viewer component. + +Metered licensing allows you to dynamically monitor and control the usage of GroupDocs.Viewer based on the number of document pages processed instead of a traditional per-server or per-developer license. This flexible licensing model is suitable for scenarios where the document processing requirements vary over time or when you want to pay only for what you use. + +Example usage: + +``` + + Metered metered = new Metered(); + metered.setMeteredKey(publicKey, privateKey); + // Perform document processing operations using GroupDocs.Viewer + // ... + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Metered()](#Metered--) | | +## Methods + +| Method | Description | +| --- | --- | +| [getConsumptionQuantity()](#getConsumptionQuantity--) | Retrieves the amount of megabytes (MB) processed. | +| [getConsumptionCredit()](#getConsumptionCredit--) | Retrieves the count of credits consumed. | +| [setMeteredKey(String publicKey, String privateKey)](#setMeteredKey-java.lang.String-java.lang.String-) | Activates the product with Metered keys. | +### Metered() {#Metered--} +``` +public Metered() +``` + + +### getConsumptionQuantity() {#getConsumptionQuantity--} +``` +public static double getConsumptionQuantity() +``` + + +Retrieves the amount of megabytes (MB) processed. + +This method returns the total amount of MB processed by the component. + +**Example:** + +``` + + String publicKey = "Public Key"; + String privateKey = "Private Key"; + Metered metered = new Metered(); + metered.setMeteredKey(publicKey, privateKey); + double mbProcessed = Metered.getConsumptionQuantity(); + +``` + +**Returns:** +double - the amount of MB processed. +### getConsumptionCredit() {#getConsumptionCredit--} +``` +public static double getConsumptionCredit() +``` + + +Retrieves the count of credits consumed. + +This method returns the total count of credits consumed by the component. + +**Example:** + +``` + + String publicKey = "Public Key"; + String privateKey = "Private Key"; + Metered metered = new Metered(); + metered.setMeteredKey(publicKey, privateKey); + double creditsConsumed = Metered.getConsumptionCredit(); + +``` + +**Returns:** +double - the count of credits consumed. +### setMeteredKey(String publicKey, String privateKey) {#setMeteredKey-java.lang.String-java.lang.String-} +``` +public final void setMeteredKey(String publicKey, String privateKey) +``` + + +Activates the product with Metered keys. + +Following example demonstrates how to activate product with Metered keys. + +**Example:** + +``` + + String publicKey = "Public Key"; + String privateKey = "Private Key"; + Metered metered = new Metered(); + metered.setMeteredKey(publicKey, privateKey); + +``` + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| publicKey | java.lang.String | The public key. | +| privateKey | java.lang.String | The private key. | + diff --git a/english/nodejs-java/com.groupdocs.viewer/viewer/_index.md b/english/nodejs-java/com.groupdocs.viewer/viewer/_index.md new file mode 100644 index 00000000..d3c0590c --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer/viewer/_index.md @@ -0,0 +1,755 @@ +--- +title: Viewer +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Represents the main class that controls the document rendering process. +type: docs +weight: 12 +url: /nodejs-java/com.groupdocs.viewer/viewer/ +--- +**Inheritance:** +java.lang.Object + +**All Implemented Interfaces:** +java.io.Closeable +``` +public class Viewer implements Closeable +``` + +Represents the main class that controls the document rendering process. + +The Viewer class is the entry point for rendering documents using the GroupDocs.Viewer component. It provides methods and options to load documents from various sources, customize the rendering process, and retrieve the rendered output in different formats. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("source.pdf")) { + viewer.view(new PngViewOptions("result-page{0}.png")); + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [Viewer(InputStream fileStream)](#Viewer-java.io.InputStream-) | Initializes a new instance of the Viewer class. | +| [Viewer(InputStream fileStream, boolean leaveOpen)](#Viewer-java.io.InputStream-boolean-) | Initializes a new instance of the Viewer class. | +| [Viewer(InputStream fileStream, LoadOptions loadOptions)](#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-) | Initializes a new instance of the Viewer class. | +| [Viewer(InputStream fileStream, LoadOptions loadOptions, boolean leaveOpen)](#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-boolean-) | Initializes a new instance of the Viewer class. | +| [Viewer(InputStream fileStream, ViewerSettings settings)](#Viewer-java.io.InputStream-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(InputStream fileStream, ViewerSettings settings, boolean leaveOpen)](#Viewer-java.io.InputStream-com.groupdocs.viewer.ViewerSettings-boolean-) | Initializes a new instance of the Viewer class. | +| [Viewer(InputStream fileStream, LoadOptions loadOptions, ViewerSettings settings)](#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(InputStream fileStream, LoadOptions loadOptions, ViewerSettings settings, boolean leaveOpen)](#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-boolean-) | Initializes new instance of Viewer class. | +| [Viewer(URL url)](#Viewer-java.net.URL-) | Initializes a new instance of the Viewer class. | +| [Viewer(URL url, LoadOptions loadOptions)](#Viewer-java.net.URL-com.groupdocs.viewer.options.LoadOptions-) | Initializes a new instance of the Viewer class. | +| [Viewer(URL url, ViewerSettings settings)](#Viewer-java.net.URL-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(URL url, LoadOptions loadOptions, ViewerSettings settings)](#Viewer-java.net.URL-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(FileReader fileReader, ViewerSettings settings)](#Viewer-com.groupdocs.viewer.interfaces.FileReader-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(FileReader fileReader, LoadOptions loadOptions, ViewerSettings settings)](#Viewer-com.groupdocs.viewer.interfaces.FileReader-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(String filePath)](#Viewer-java.lang.String-) | Initializes a new instance of the Viewer class. | +| [Viewer(Path filePath)](#Viewer-java.nio.file.Path-) | Initializes a new instance of the Viewer class. | +| [Viewer(String filePath, LoadOptions loadOptions)](#Viewer-java.lang.String-com.groupdocs.viewer.options.LoadOptions-) | Initializes a new instance of the Viewer class. | +| [Viewer(Path filePath, LoadOptions loadOptions)](#Viewer-java.nio.file.Path-com.groupdocs.viewer.options.LoadOptions-) | Initializes a new instance of the Viewer class. | +| [Viewer(String filePath, ViewerSettings settings)](#Viewer-java.lang.String-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(Path filePath, ViewerSettings settings)](#Viewer-java.nio.file.Path-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(String filePath, LoadOptions loadOptions, ViewerSettings settings)](#Viewer-java.lang.String-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +| [Viewer(Path filePath, LoadOptions loadOptions, ViewerSettings settings)](#Viewer-java.nio.file.Path-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-) | Initializes a new instance of the Viewer class. | +## Fields + +| Field | Description | +| --- | --- | +| [LOAD_OPTIONS](#LOAD-OPTIONS) | | +| [SETTINGS](#SETTINGS) | | +| [FILE_READER](#FILE-READER) | | +| [OPTIONS](#OPTIONS) | | +## Methods + +| Method | Description | +| --- | --- | +| [getViewInfo(ViewInfoOptions options)](#getViewInfo-com.groupdocs.viewer.options.ViewInfoOptions-) | Returns information about the view and document specific information. | +| [getAttachments()](#getAttachments--) | Returns attachments contained by the document. | +| [saveAttachment(Attachment attachment, OutputStream destination)](#saveAttachment-com.groupdocs.viewer.results.Attachment-java.io.OutputStream-) | Saves an attachment file to the destination stream. | +| [view(ViewOptions options)](#view-com.groupdocs.viewer.options.ViewOptions-) | Creates a view of all document pages. | +| [view(ViewOptions options, int[] pageNumbers)](#view-com.groupdocs.viewer.options.ViewOptions-int...-) | Creates a view of specific document pages. | +| [getFileInfo()](#getFileInfo--) | Returns information about the file, such as file type and a flag that indicates if the file is encrypted. | +| [close()](#close--) | Releases the file stream and managed internal resources. | +### Viewer(InputStream fileStream) {#Viewer-java.io.InputStream-} +``` +public Viewer(InputStream fileStream) +``` + + +Initializes a new instance of the Viewer class. + +More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The method that returns a readable stream. | + +### Viewer(InputStream fileStream, boolean leaveOpen) {#Viewer-java.io.InputStream-boolean-} +``` +public Viewer(InputStream fileStream, boolean leaveOpen) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The file stream. | +| leaveOpen | boolean | true to leave the stream open after the Viewer object is disposed; otherwise, false. | + +### Viewer(InputStream fileStream, LoadOptions loadOptions) {#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-} +``` +public Viewer(InputStream fileStream, LoadOptions loadOptions) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The readable stream. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | + +### Viewer(InputStream fileStream, LoadOptions loadOptions, boolean leaveOpen) {#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-boolean-} +``` +public Viewer(InputStream fileStream, LoadOptions loadOptions, boolean leaveOpen) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The file stream. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | +| leaveOpen | boolean | true to leave the stream open after the Viewer object is disposed; otherwise, false. | + +### Viewer(InputStream fileStream, ViewerSettings settings) {#Viewer-java.io.InputStream-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(InputStream fileStream, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The file stream. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(InputStream fileStream, ViewerSettings settings, boolean leaveOpen) {#Viewer-java.io.InputStream-com.groupdocs.viewer.ViewerSettings-boolean-} +``` +public Viewer(InputStream fileStream, ViewerSettings settings, boolean leaveOpen) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The file stream. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | +| leaveOpen | boolean | true to leave the stream open after the Viewer object is disposed; otherwise, false. | + +### Viewer(InputStream fileStream, LoadOptions loadOptions, ViewerSettings settings) {#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(InputStream fileStream, LoadOptions loadOptions, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The file stream. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(InputStream fileStream, LoadOptions loadOptions, ViewerSettings settings, boolean leaveOpen) {#Viewer-java.io.InputStream-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-boolean-} +``` +public Viewer(InputStream fileStream, LoadOptions loadOptions, ViewerSettings settings, boolean leaveOpen) +``` + + +Initializes new instance of Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileStream | java.io.InputStream | The file stream. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | +| leaveOpen | boolean | true to leave the stream open after the Viewer object is disposed; otherwise, false. | + +### Viewer(URL url) {#Viewer-java.net.URL-} +``` +public Viewer(URL url) +``` + + +Initializes a new instance of the Viewer class. + +More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| url | java.net.URL | A URL to a file that should be loaded into the Viewer. | + +### Viewer(URL url, LoadOptions loadOptions) {#Viewer-java.net.URL-com.groupdocs.viewer.options.LoadOptions-} +``` +public Viewer(URL url, LoadOptions loadOptions) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| url | java.net.URL | A URL to a file that should be loaded into the Viewer. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | + +### Viewer(URL url, ViewerSettings settings) {#Viewer-java.net.URL-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(URL url, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| url | java.net.URL | A URL to a file that should be loaded into the Viewer. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(URL url, LoadOptions loadOptions, ViewerSettings settings) {#Viewer-java.net.URL-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(URL url, LoadOptions loadOptions, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading encrypted documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| url | java.net.URL | A URL to a file that should be loaded into the Viewer. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(FileReader fileReader, ViewerSettings settings) {#Viewer-com.groupdocs.viewer.interfaces.FileReader-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(FileReader fileReader, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + +This constructor allows you to create a Viewer object to view a document from a [FileReader](../../com.groupdocs.viewer.interfaces/filereader) with the specified [ViewerSettings](../../com.groupdocs.viewer/viewersettings). + + **Learn more** + + * To learn about the file types supported by GroupDocs.Viewer, visit: [Document formats supported by GroupDocs.Viewer][] + * To explore the features of GroupDocs.Viewer for Java, refer to: [Developer Guide][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileReader | [FileReader](../../com.groupdocs.viewer.interfaces/filereader) | The [FileReader](../../com.groupdocs.viewer.interfaces/filereader) containing the document to be loaded into the Viewer. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The [ViewerSettings](../../com.groupdocs.viewer/viewersettings) to be applied to the Viewer. | + +### Viewer(FileReader fileReader, LoadOptions loadOptions, ViewerSettings settings) {#Viewer-com.groupdocs.viewer.interfaces.FileReader-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(FileReader fileReader, LoadOptions loadOptions, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + +Provides functionality to load and view documents using GroupDocs.Viewer. + +**Note:** Ensure that the file reader, load options, and settings are properly configured for accurate document processing. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| fileReader | [FileReader](../../com.groupdocs.viewer.interfaces/filereader) | The file reader. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The load options. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(String filePath) {#Viewer-java.lang.String-} +``` +public Viewer(String filePath) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more:** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.lang.String | The path to the file to render. | + +### Viewer(Path filePath) {#Viewer-java.nio.file.Path-} +``` +public Viewer(Path filePath) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.nio.file.Path | The path to the file to render. | + +### Viewer(String filePath, LoadOptions loadOptions) {#Viewer-java.lang.String-com.groupdocs.viewer.options.LoadOptions-} +``` +public Viewer(String filePath, LoadOptions loadOptions) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading password-protected documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.lang.String | The path to the file to render. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | + +### Viewer(Path filePath, LoadOptions loadOptions) {#Viewer-java.nio.file.Path-com.groupdocs.viewer.options.LoadOptions-} +``` +public Viewer(Path filePath, LoadOptions loadOptions) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading password-protected documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view a document with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view a document with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.nio.file.Path | The path to the file to render. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | + +### Viewer(String filePath, ViewerSettings settings) {#Viewer-java.lang.String-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(String filePath, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.lang.String | The path to the file to render. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(Path filePath, ViewerSettings settings) {#Viewer-java.nio.file.Path-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(Path filePath, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.nio.file.Path | The path to the file to render. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(String filePath, LoadOptions loadOptions, ViewerSettings settings) {#Viewer-java.lang.String-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(String filePath, LoadOptions loadOptions, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading password-protected documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view documents with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view documents with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.lang.String | The path to the file to render. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### Viewer(Path filePath, LoadOptions loadOptions, ViewerSettings settings) {#Viewer-java.nio.file.Path-com.groupdocs.viewer.options.LoadOptions-com.groupdocs.viewer.ViewerSettings-} +``` +public Viewer(Path filePath, LoadOptions loadOptions, ViewerSettings settings) +``` + + +Initializes a new instance of the Viewer class. + + **Learn more** + + * More about file types supported by GroupDocs.Viewer: [Document formats supported by GroupDocs.Viewer][] + * More about GroupDocs.Viewer for Java features: [Developer Guide][] + * More about loading password-protected documents and viewing files from third-party storages with GroupDocs.Viewer for Java: [How to load and view documents with GroupDocs.Viewer][] + + +[Document formats supported by GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Supported+Document+Formats +[Developer Guide]: https://docs.groupdocs.com/display/viewerjava/Developer+Guide +[How to load and view documents with GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Loading + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| filePath | java.nio.file.Path | The path to the file to render. | +| loadOptions | [LoadOptions](../../com.groupdocs.viewer.options/loadoptions) | The document load options. | +| settings | [ViewerSettings](../../com.groupdocs.viewer/viewersettings) | The Viewer settings. | + +### LOAD_OPTIONS {#LOAD-OPTIONS} +``` +public static final String LOAD_OPTIONS +``` + + +### SETTINGS {#SETTINGS} +``` +public static final String SETTINGS +``` + + +### FILE_READER {#FILE-READER} +``` +public static final String FILE_READER +``` + + +### OPTIONS {#OPTIONS} +``` +public static final String OPTIONS +``` + + +### getViewInfo(ViewInfoOptions options) {#getViewInfo-com.groupdocs.viewer.options.ViewInfoOptions-} +``` +public final ViewInfo getViewInfo(ViewInfoOptions options) +``` + + +Returns information about the view and document specific information. + + **Learn more:** + + * Learn more about the document - file type, page count, and other format specific properties: [How to get file information using GroupDocs.Viewer][] + + +[How to get file information using GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Get+file+information + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| options | [ViewInfoOptions](../../com.groupdocs.viewer.options/viewinfooptions) | The view info options. | + +**Returns:** +[ViewInfo](../../com.groupdocs.viewer.results/viewinfo) - Information about the view and document specific information. +### getAttachments() {#getAttachments--} +``` +public final List getAttachments() +``` + + +Returns attachments contained by the document. + + **Learn more:** + + * Learn more about getting document attachments in Java: [How to get a list of document attachments using GroupDocs.Viewer][] + * Learn more about saving document attachments in Java: [How to save document attachments using GroupDocs.Viewer][] + + +[How to get a list of document attachments using GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Get+attachments +[How to save document attachments using GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Save+attachments + +**Returns:** +java.util.List - attachments contained by the document. +### saveAttachment(Attachment attachment, OutputStream destination) {#saveAttachment-com.groupdocs.viewer.results.Attachment-java.io.OutputStream-} +``` +public void saveAttachment(Attachment attachment, OutputStream destination) +``` + + +Saves an attachment file to the destination stream. + + **Learn more:** + + * Learn more about getting document attachments in Java: [How to get a list of document attachments using GroupDocs.Viewer][] + * Learn more about saving document attachments in Java: [How to save document attachments using GroupDocs.Viewer][] + + +[How to get a list of document attachments using GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Get+attachments +[How to save document attachments using GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Save+attachments + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| attachment | [Attachment](../../com.groupdocs.viewer.results/attachment) | The attachment. | +| destination | java.io.OutputStream | The writable stream. | + +### view(ViewOptions options) {#view-com.groupdocs.viewer.options.ViewOptions-} +``` +public final void view(ViewOptions options) +``` + + +Creates a view of all document pages. + + **Learn more** + + * Learn more about different viewing options following this guide: [How to customize document viewing output using GroupDocs.Viewer][] + + +[How to customize document viewing output using GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Viewing + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| options | [ViewOptions](../../com.groupdocs.viewer.options/viewoptions) | The view options. | + +### view(ViewOptions options, int[] pageNumbers) {#view-com.groupdocs.viewer.options.ViewOptions-int...-} +``` +public final void view(ViewOptions options, int[] pageNumbers) +``` + + +Creates a view of specific document pages. + + **Learn more** + + * Learn more about different viewing options following this guide: [How to customize document viewing output using GroupDocs.Viewer][] + + +[How to customize document viewing output using GroupDocs.Viewer]: https://docs.groupdocs.com/display/viewerjava/Viewing + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| options | [ViewOptions](../../com.groupdocs.viewer.options/viewoptions) | The view options. | +| pageNumbers | int[] | The page numbers to view. | + +### getFileInfo() {#getFileInfo--} +``` +public FileInfo getFileInfo() +``` + + +Returns information about the file, such as file type and a flag that indicates if the file is encrypted. + +**Learn more:** + + * Learn more about how to check if a file is encrypted: [How to check if a file is encrypted][] + + +[How to check if a file is encrypted]: https://docs.groupdocs.com/viewer/net/how-to-check-if-file-is-encrypted/ + +**Returns:** +[FileInfo](../../com.groupdocs.viewer.results/fileinfo) - the file information. +### close() {#close--} +``` +public final void close() +``` + + +Releases the file stream and managed internal resources. + diff --git a/english/nodejs-java/com.groupdocs.viewer/viewersettings/_index.md b/english/nodejs-java/com.groupdocs.viewer/viewersettings/_index.md new file mode 100644 index 00000000..70ac84df --- /dev/null +++ b/english/nodejs-java/com.groupdocs.viewer/viewersettings/_index.md @@ -0,0 +1,140 @@ +--- +title: ViewerSettings +second_title: GroupDocs.Viewer for Node.js via Java API Reference +description: Defines settings for customizing the behavior of the Viewer component. +type: docs +weight: 13 +url: /nodejs-java/com.groupdocs.viewer/viewersettings/ +--- +**Inheritance:** +java.lang.Object +``` +public class ViewerSettings +``` + +Defines settings for customizing the behavior of the Viewer component. + +The ViewerSettings class provides options and properties to customize the behavior of the GroupDocs.Viewer component during the document rendering process. You can use this class to specify various settings, such as logger, custom cache implementation, and more. + +Example usage: + +``` + + final ViewerSettings viewerSettings = new ViewerSettings(); + viewerSettings.setLogger(new ConsoleLogger(false, true)); + + try (Viewer viewer = new Viewer("source.pdf", viewerSettings)) { + // Document processing + } + +``` +## Constructors + +| Constructor | Description | +| --- | --- | +| [ViewerSettings(Cache cache, ILogger logger)](#ViewerSettings-com.groupdocs.viewer.caching.Cache-com.groupdocs.foundation.logging.ILogger-) | Initializes a new instance of the ViewerSettings class. | +| [ViewerSettings(ILogger logger)](#ViewerSettings-com.groupdocs.foundation.logging.ILogger-) | Initializes a new instance of the ViewerSettings class. | +| [ViewerSettings(Cache cache)](#ViewerSettings-com.groupdocs.viewer.caching.Cache-) | Initializes a new instance of the ViewerSettings class. | +| [ViewerSettings()](#ViewerSettings--) | Initializes a new instance of the ViewerSettings class. | +## Methods + +| Method | Description | +| --- | --- | +| [getLogger()](#getLogger--) | Gets the logger implementation used for logging (Errors, Warnings, Traces). | +| [setLogger(ILogger logger)](#setLogger-com.groupdocs.foundation.logging.ILogger-) | Sets the logger implementation used for logging (Errors, Warnings, Traces). | +| [getCache()](#getCache--) | Gets the cache implementation used for storing rendering results. | +| [setCache(Cache cache)](#setCache-com.groupdocs.viewer.caching.Cache-) | Sets the cache implementation used for storing rendering results. | +### ViewerSettings(Cache cache, ILogger logger) {#ViewerSettings-com.groupdocs.viewer.caching.Cache-com.groupdocs.foundation.logging.ILogger-} +``` +public ViewerSettings(Cache cache, ILogger logger) +``` + + +Initializes a new instance of the ViewerSettings class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| cache | [Cache](../../com.groupdocs.viewer.caching/cache) | The cache. | +| logger | com.groupdocs.foundation.logging.ILogger | The logger. | + +### ViewerSettings(ILogger logger) {#ViewerSettings-com.groupdocs.foundation.logging.ILogger-} +``` +public ViewerSettings(ILogger logger) +``` + + +Initializes a new instance of the ViewerSettings class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| logger | com.groupdocs.foundation.logging.ILogger | The logger. | + +### ViewerSettings(Cache cache) {#ViewerSettings-com.groupdocs.viewer.caching.Cache-} +``` +public ViewerSettings(Cache cache) +``` + + +Initializes a new instance of the ViewerSettings class. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| cache | [Cache](../../com.groupdocs.viewer.caching/cache) | The cache. | + +### ViewerSettings() {#ViewerSettings--} +``` +public ViewerSettings() +``` + + +Initializes a new instance of the ViewerSettings class. + +### getLogger() {#getLogger--} +``` +public ILogger getLogger() +``` + + +Gets the logger implementation used for logging (Errors, Warnings, Traces). + +**Returns:** +com.groupdocs.foundation.logging.ILogger - the logger implementation. +### setLogger(ILogger logger) {#setLogger-com.groupdocs.foundation.logging.ILogger-} +``` +public void setLogger(ILogger logger) +``` + + +Sets the logger implementation used for logging (Errors, Warnings, Traces). + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| logger | com.groupdocs.foundation.logging.ILogger | The logger implementation to set. | + +### getCache() {#getCache--} +``` +public final Cache getCache() +``` + + +Gets the cache implementation used for storing rendering results. + +**Returns:** +[Cache](../../com.groupdocs.viewer.caching/cache) - the cache implementation. +### setCache(Cache cache) {#setCache-com.groupdocs.viewer.caching.Cache-} +``` +public void setCache(Cache cache) +``` + + +Sets the cache implementation used for storing rendering results. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| cache | [Cache](../../com.groupdocs.viewer.caching/cache) | The cache implementation. | +