Skip to content

Commit

Permalink
Update content 2024-07-03 03:07:23
Browse files Browse the repository at this point in the history
  • Loading branch information
yevgen-nykytenko committed Jul 3, 2024
1 parent 0814d4d commit 4c93696
Show file tree
Hide file tree
Showing 4 changed files with 353 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
```


Expand All @@ -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()
```


Expand All @@ -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)
```


Expand Down
213 changes: 208 additions & 5 deletions english/nodejs-java/com.groupdocs.viewer.options/loadoptions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ Example usage:
| [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. |
| [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. |
| [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. |
| [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<String> 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()
Expand Down Expand Up @@ -303,14 +307,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)
Expand Down Expand Up @@ -409,3 +442,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<String> 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<java.lang.String>
### setWhitelistedResources(List<String> whitelistedResources) {#setWhitelistedResources-java.util.List-java.lang.String--}
```
public void setWhitelistedResources(List<String> 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<java.lang.String> | The list of URL fragments corresponding to external resources that should be loaded. |

106 changes: 106 additions & 0 deletions english/nodejs-java/com.groupdocs.viewer.options/pdfoptions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 | |

Loading

0 comments on commit 4c93696

Please sign in to comment.