Skip to content

Commit

Permalink
external resources management
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel-A-Sokolov committed Oct 17, 2023
1 parent e2e7730 commit 6cc6c57
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ hideChildren: False

If the document contains external resources, such as images, GroupDocs.Viewer loads them when rendering a document. This allows the document to display correctly, but is a potential security risk.

GroupDocs.Viewer allows you to manage loading of external resources contained by a document. These features are supported for the [Word Processing File Formats](https://docs.fileformat.com/word-processing/).
GroupDocs.Viewer allows you to manage loading of external resources contained by a document. These features are supported for the following formats:
- [Word Processing File Formats](https://docs.fileformat.com/word-processing/)
- [Web File Formats](https://docs.fileformat.com/web/)
- [SpreadSheet File Formats](https://docs.fileformat.com/spreadsheet/)

Use the [LoadOptions](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/loadoptions) object to manage loading of external resources.

Expand All @@ -36,6 +39,12 @@ using (Viewer viewer = new Viewer("business-flyer.docx", loadOptions))
{{< /tab >}}
{{< /tabs >}}

The following images show the output file with and without external resources (see top right corner):

| loadOptions.SkipExternalResources = false | loadOptions.SkipExternalResources = true |
| --- | --- |
| ![False](/viewer/net/images/with-external-resources.png) | ![True](/viewer/net/images/without-external-resources.png) |

## Manage a safelist for loading external resources

The following code snippet shows how to allow loading of external resources from specific URLs:
Expand Down
2 changes: 1 addition & 1 deletion net/getting-started/system-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ GroupDocs.Viewer for .NET supports .NET as follows:
* .NET Framework 4.5.1 (out of support since v23.8)
* .NET Framework 4.5.2 (out of support since v23.8)
* .NET Framework 4.6.0 (out of support since v23.8)
* .NET Framework 4.6.2 (out of support since v23.8)
* .NET Framework 4.6.2
* .NET Framework 4.7
* .NET Framework 4.7.2
* .NET Framework 4.8
Expand Down
Binary file added net/images/with-external-resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added net/images/without-external-resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6cc6c57

Please sign in to comment.