diff --git a/english/java/com.groupdocs.viewer.fonts/folderfontsource/_index.md b/english/java/com.groupdocs.viewer.fonts/folderfontsource/_index.md index dc3200efc..0fc37d0ad 100644 --- a/english/java/com.groupdocs.viewer.fonts/folderfontsource/_index.md +++ b/english/java/com.groupdocs.viewer.fonts/folderfontsource/_index.md @@ -92,7 +92,7 @@ Determines whether two FolderFontSource objects are not the same. boolean - true if both FolderFontSource objects are not the same; otherwise, false . ### getFolderPath() {#getFolderPath--} ``` -public final String getFolderPath() +public String getFolderPath() ``` @@ -102,7 +102,7 @@ Gets the path to the folder that contains TrueType fonts. java.lang.String - the path to the folder that contains TrueType fonts. ### getSearchOption() {#getSearchOption--} ``` -public final SearchOption getSearchOption() +public SearchOption getSearchOption() ``` @@ -122,7 +122,7 @@ Checks if the fonts would be searched recursively. 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) +public boolean equals(FolderFontSource other) ``` diff --git a/english/java/com.groupdocs.viewer.options/loadoptions/_index.md b/english/java/com.groupdocs.viewer.options/loadoptions/_index.md index 49259973f..5ec50d103 100644 --- a/english/java/com.groupdocs.viewer.options/loadoptions/_index.md +++ b/english/java/com.groupdocs.viewer.options/loadoptions/_index.md @@ -54,7 +54,7 @@ Example usage: | [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). | | [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. | +| [getResourceLoadingTimeout()](#getResourceLoadingTimeout--) | Gets the timeout for loading external resources. | | [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. | @@ -62,6 +62,10 @@ Example usage: | [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. | +| [isSkipExternalResources()](#isSkipExternalResources--) | When set to true, all external resources such as images will not be loaded except \#getWhitelistedResources().getWhitelistedResources(). | +| [setSkipExternalResources(boolean skipExternalResources)](#setSkipExternalResources-boolean-) | When set to true, all external resources such as images will not be loaded except \#getWhitelistedResources().getWhitelistedResources(). | +| [getWhitelistedResources()](#getWhitelistedResources--) | The list of URL fragments corresponding to external resources that should be loaded when \#isSkipExternalResources().isSkipExternalResources() is set to `true`. | +| [setWhitelistedResources(List whitelistedResources)](#setWhitelistedResources-java.util.List-java.lang.String--) | Sets the list of URL fragments corresponding to external resources that should be loaded when \#isSkipExternalResources().isSkipExternalResources() is set to `true`. | ### LoadOptions() {#LoadOptions--} ``` public LoadOptions() @@ -289,14 +293,43 @@ public int getResourceLoadingTimeout() ``` -Gets the timeout for loading external resources, such as graphics. +Gets the timeout for loading external resources. -***Note:** The default value is 30 seconds.* +**Note:** The default value is 10 seconds. -This option is supported for Word Processing documents that contain external resources. +**This option applies to the following file formats:** + + * [Presentation file formats][] + * [Spreadsheet file formats][] + * [Web file formats][] + * [Word processing file formats][] + +**Learn more about options to manage external resources:** + + * [Set timeout for loading external resources][] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setResourceLoadingTimeout(5000); // Set resource loading timeout to 5 seconds + + try (Viewer viewer = new Viewer("business-flyer.docx", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Presentation file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#presentation-file-formats +[Spreadsheet file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#spreadsheet-file-formats +[Web file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#web-file-formats +[Word processing file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#word-processing-file-formats +[Set timeout for loading external resources]: https://docs.groupdocs.com/viewer/java/set-timeout-for-loading-external-resources-contained-by-a-document/ **Returns:** -int - the loading timeout, milliseconds. +int ### setResourceLoadingTimeout(int resourceLoadingTimeout) {#setResourceLoadingTimeout-int-} ``` public void setResourceLoadingTimeout(int resourceLoadingTimeout) @@ -395,3 +428,173 @@ Sets the security options to control the process of extracting archives. | --- | --- | --- | | archiveSecurityOptions | com.groupdocs.viewer.options.ArchiveSecurityOptions | The options object to configure the process of extracting archives. | +### isSkipExternalResources() {#isSkipExternalResources--} +``` +public boolean isSkipExternalResources() +``` + + +When set to true, all external resources such as images will not be loaded except \#getWhitelistedResources().getWhitelistedResources(). + +**This option applies to the following file formats:** + + * [Presentation file formats][] + * [Spreadsheet file formats][] + * [Web file formats][] + * [Word processing file formats][] + +**Learn more about options to manage external resources:** + + * [Set timeout for loading external resources][] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setSkipExternalResources(true); // Skip loading of external resources + + try (Viewer viewer = new Viewer("business-flyer.docx", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Presentation file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#presentation-file-formats +[Spreadsheet file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#spreadsheet-file-formats +[Web file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#web-file-formats +[Word processing file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#word-processing-file-formats +[Set timeout for loading external resources]: https://docs.groupdocs.com/viewer/java/set-timeout-for-loading-external-resources-contained-by-a-document/ + +**Returns:** +boolean +### setSkipExternalResources(boolean skipExternalResources) {#setSkipExternalResources-boolean-} +``` +public void setSkipExternalResources(boolean skipExternalResources) +``` + + +When set to true, all external resources such as images will not be loaded except \#getWhitelistedResources().getWhitelistedResources(). + +**This option applies to the following file formats:** + + * [Presentation file formats][] + * [Spreadsheet file formats][] + * [Web file formats][] + * [Word processing file formats][] + +**Learn more about options to manage external resources:** + + * [Set timeout for loading external resources][] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setSkipExternalResources(true); // Skip loading of external resources + + try (Viewer viewer = new Viewer("business-flyer.docx", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Presentation file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#presentation-file-formats +[Spreadsheet file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#spreadsheet-file-formats +[Web file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#web-file-formats +[Word processing file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#word-processing-file-formats +[Set timeout for loading external resources]: https://docs.groupdocs.com/viewer/java/set-timeout-for-loading-external-resources-contained-by-a-document/ + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| skipExternalResources | boolean | The flag to enable or disable loading of external resources. | + +### getWhitelistedResources() {#getWhitelistedResources--} +``` +public List getWhitelistedResources() +``` + + +The list of URL fragments corresponding to external resources that should be loaded when \#isSkipExternalResources().isSkipExternalResources() is set to `true`. + +**This option applies to the following file formats:** + + * [Presentation file formats][] + * [Spreadsheet file formats][] + * [Web file formats][] + * [Word processing file formats][] + +**Learn more about options to manage external resources:** + + * [Set timeout for loading external resources][] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setSkipExternalResources(true); // Skip loading of external resources + loadOptions.getWhitelistedResources().add("avatars.githubusercontent.com"); // Enable loading of external resources that have 'avatars.githubusercontent.com' fragment in resource URL. + try (Viewer viewer = new Viewer("business-flyer.docx", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Presentation file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#presentation-file-formats +[Spreadsheet file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#spreadsheet-file-formats +[Web file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#web-file-formats +[Word processing file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#word-processing-file-formats +[Set timeout for loading external resources]: https://docs.groupdocs.com/viewer/java/set-timeout-for-loading-external-resources-contained-by-a-document/ + +**Returns:** +java.util.List +### setWhitelistedResources(List whitelistedResources) {#setWhitelistedResources-java.util.List-java.lang.String--} +``` +public void setWhitelistedResources(List whitelistedResources) +``` + + +Sets the list of URL fragments corresponding to external resources that should be loaded when \#isSkipExternalResources().isSkipExternalResources() is set to `true`. + +**This option applies to the following file formats:** + + * [Presentation file formats][] + * [Spreadsheet file formats][] + * [Web file formats][] + * [Word processing file formats][] + +**Learn more about options to manage external resources:** + + * [Set timeout for loading external resources][] + +**Example:** + +``` +LoadOptions loadOptions = new LoadOptions(); + loadOptions.setSkipExternalResources(true); // Skip loading of external resources + loadOptions.setWhitelistedResources(Arrays.asList("avatars.githubusercontent.com")); // Enable loading of external resources that have 'avatars.githubusercontent.com' fragment in resource URL. + try (Viewer viewer = new Viewer("business-flyer.docx", loadOptions)) { + HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); + + viewer.view(viewOptions); + } +``` + + +[Presentation file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#presentation-file-formats +[Spreadsheet file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#spreadsheet-file-formats +[Web file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#web-file-formats +[Word processing file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#word-processing-file-formats +[Set timeout for loading external resources]: https://docs.groupdocs.com/viewer/java/set-timeout-for-loading-external-resources-contained-by-a-document/ + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| whitelistedResources | java.util.List | The list of URL fragments corresponding to external resources that should be loaded. | + diff --git a/english/java/com.groupdocs.viewer.options/pdfoptions/_index.md b/english/java/com.groupdocs.viewer.options/pdfoptions/_index.md index 215ab626b..0897631e4 100644 --- a/english/java/com.groupdocs.viewer.options/pdfoptions/_index.md +++ b/english/java/com.groupdocs.viewer.options/pdfoptions/_index.md @@ -57,6 +57,10 @@ Example usage: | [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-) | | +| [isWrapImagesInSvg()](#isWrapImagesInSvg--) | Enable this option to wrap each image in the output HTML document in SVG tag to improve output quality. | +| [setWrapImagesInSvg(boolean wrapImagesInSvg)](#setWrapImagesInSvg-boolean-) | Enable this option to wrap each image in the output HTML document in SVG tag to improve output quality. | +| [isDisableFontLicenseVerifications()](#isDisableFontLicenseVerifications--) | Disable any license restrictions for all fonts in current XPS/OXPS document. | +| [setDisableFontLicenseVerifications(boolean disableFontLicenseVerifications)](#setDisableFontLicenseVerifications-boolean-) | Set the flag to disable any license restrictions for all fonts in current XPS/OXPS document. | ### PdfOptions() {#PdfOptions--} ``` public PdfOptions() @@ -264,3 +268,105 @@ public void setFixedLayout(boolean fixedLayout) | --- | --- | --- | | fixedLayout | boolean | | +### isWrapImagesInSvg() {#isWrapImagesInSvg--} +``` +public boolean isWrapImagesInSvg() +``` + + +Enable this option to wrap each image in the output HTML document in SVG tag to improve output quality. + +This option is supported when rendering [PDF and Page Layout file formats][] to HTML with embedded and external resources. + +By default, when rendering to PDF and Page Layout files, all the images are rendered as one PNG image. The rendered PNG image is used as the background for the output HTML document. + +Learn more: + + * [Render PDF documents as HTML and image files][] + * [Render to HTML][] + + +[PDF and Page Layout file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#pdf-and-page-layout-file-formats +[Render PDF documents as HTML and image files]: https://docs.groupdocs.com/viewer/java/render-pdf-documents/ +[Render to HTML]: https://docs.groupdocs.com/viewer/java/rendering-to-html/ + +**Returns:** +boolean - true if images are wrapped in SVG, false otherwise. +### setWrapImagesInSvg(boolean wrapImagesInSvg) {#setWrapImagesInSvg-boolean-} +``` +public void setWrapImagesInSvg(boolean wrapImagesInSvg) +``` + + +Enable this option to wrap each image in the output HTML document in SVG tag to improve output quality. + +This option is supported when rendering [PDF and Page Layout file formats][] to HTML with embedded and external resources. + +By default, when rendering to PDF and Page Layout files, all the images are rendered as one PNG image. The rendered PNG image is used as the background for the output HTML document. + +Learn more: + + * [Render PDF documents as HTML and image files][] + * [Render to HTML][] + + +[PDF and Page Layout file formats]: https://docs.groupdocs.com/viewer/java/supported-document-formats/#pdf-and-page-layout-file-formats +[Render PDF documents as HTML and image files]: https://docs.groupdocs.com/viewer/java/render-pdf-documents/ +[Render to HTML]: https://docs.groupdocs.com/viewer/java/rendering-to-html/ + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| wrapImagesInSvg | boolean | true if images should be wrapped in SVG, false otherwise. | + +### isDisableFontLicenseVerifications() {#isDisableFontLicenseVerifications--} +``` +public boolean isDisableFontLicenseVerifications() +``` + + +Disable any license restrictions for all fonts in current XPS/OXPS document. + +Many operations with font can't be executed if these operations are prohibited by the license of this font. For example, some font can't be embedded into a PDF document if the license rules disable embedding for this font. Be careful when using this flag. When it is set, it means that the person who sets this flag takes all responsibility for possible license/law violations on themselves. So they take it on their own risk. It's strongly recommended to use this flag only when you are fully confident that you are not breaking the copyright law. By default false. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("resume.oxps")) { + HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources("result.html"); + options.getPdfOptions().setDisableFontLicenseVerifications(true); + viewer.view(options); + } + +``` + +**Returns:** +boolean +### setDisableFontLicenseVerifications(boolean disableFontLicenseVerifications) {#setDisableFontLicenseVerifications-boolean-} +``` +public void setDisableFontLicenseVerifications(boolean disableFontLicenseVerifications) +``` + + +Set the flag to disable any license restrictions for all fonts in current XPS/OXPS document. + +Many operations with font can't be executed if these operations are prohibited by the license of this font. For example, some font can't be embedded into a PDF document if the license rules disable embedding for this font. Be careful when using this flag. When it is set, it means that the person who sets this flag takes all responsibility for possible license/law violations on themselves. So they take it on their own risk. It's strongly recommended to use this flag only when you are fully confident that you are not breaking the copyright law. By default false. + +Example usage: + +``` + + try (Viewer viewer = new Viewer("resume.oxps")) { + HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources("result.html"); + options.getPdfOptions().setDisableFontLicenseVerifications(true); + viewer.view(options); + } + +``` + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| disableFontLicenseVerifications | boolean | | + diff --git a/english/java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md b/english/java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md index bf02a4c10..2da6a0afe 100644 --- a/english/java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md +++ b/english/java/com.groupdocs.viewer.options/spreadsheetoptions/_index.md @@ -48,6 +48,8 @@ Example usage: | [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. | +| [isRenderingPrintAreaAndPageBreaks()](#isRenderingPrintAreaAndPageBreaks--) | When this option is enabled, a worksheet will be rendered by page breaks that fall within the print area. | +| [setRenderingPrintAreaAndPageBreaks(boolean renderingPrintAreaAndPageBreaks)](#setRenderingPrintAreaAndPageBreaks-boolean-) | Sets whether to render a worksheet by page breaks that fall within the print area. | | [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. | @@ -70,6 +72,7 @@ Example usage: | [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 | +| [forRenderingPrintAreaAndPageBreaks()](#forRenderingPrintAreaAndPageBreaks--) | Initializes a new instance of SpreadsheetOptions for rendering print areas and page breaks. | | [forRenderingByPageBreaks()](#forRenderingByPageBreaks--) | Initializes a new instance of the SpreadsheetOptions class for rendering print areas only. | ### isRenderByPageBreaks() {#isRenderByPageBreaks--} ``` @@ -225,6 +228,29 @@ Indicates whether only the print areas are rendered. **Returns:** boolean - true if only the print areas are rendered, false otherwise. +### isRenderingPrintAreaAndPageBreaks() {#isRenderingPrintAreaAndPageBreaks--} +``` +public boolean isRenderingPrintAreaAndPageBreaks() +``` + + +When this option is enabled, a worksheet will be rendered by page breaks that fall within the print area. + +**Returns:** +boolean +### setRenderingPrintAreaAndPageBreaks(boolean renderingPrintAreaAndPageBreaks) {#setRenderingPrintAreaAndPageBreaks-boolean-} +``` +public void setRenderingPrintAreaAndPageBreaks(boolean renderingPrintAreaAndPageBreaks) +``` + + +Sets whether to render a worksheet by page breaks that fall within the print area. + +**Parameters:** +| Parameter | Type | Description | +| --- | --- | --- | +| renderingPrintAreaAndPageBreaks | boolean | Set to true to enable, false to disable. | + ### isRenderGridLines() {#isRenderGridLines--} ``` public final boolean isRenderGridLines() @@ -478,6 +504,16 @@ To set bottom margin of the worksheet when converting to pdf if less than 0 then | --- | --- | --- | | bottomMargin | double | | +### forRenderingPrintAreaAndPageBreaks() {#forRenderingPrintAreaAndPageBreaks--} +``` +public static SpreadsheetOptions forRenderingPrintAreaAndPageBreaks() +``` + + +Initializes a new instance of SpreadsheetOptions for rendering print areas and page breaks. + +**Returns:** +[SpreadsheetOptions](../../com.groupdocs.viewer.options/spreadsheetoptions) - New instance of SpreadsheetOptions for rendering pages based on page breaks that are included into print area. The behavior is similar to printing in Excel. ### forRenderingByPageBreaks() {#forRenderingByPageBreaks--} ``` public static SpreadsheetOptions forRenderingByPageBreaks()