-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3a4cb7
commit 1a6924a
Showing
398 changed files
with
453 additions
and
335 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
java/developer-guide/troubleshooting/how-to-change-max-file-size.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
id: how-to-change-max-file-size | ||
url: viewer/java/how-to-change-max-file-size | ||
title: How to change the maximum size of a file | ||
weight: 6 | ||
description: "This article shows how to change the maximum size of a file." | ||
keywords: "file, size, signed, limit" | ||
productName: GroupDocs.Viewer for Java | ||
hideChildren: False | ||
toc: True | ||
--- | ||
Due to the numerous resources and `.class` files in the JAR file, the `MANIFEST.MF` file has become huge. For instance, it is approximately 19.7 Mb for GroupDocs.Viewer v21.2 and 22.5 Mb for GroupDocs.Viewer v23.7. | ||
|
||
That is why you may get errors similar to the one below: | ||
|
||
```sh | ||
error: error reading /home/jenkins/.gradle/caches/modules-2/files-2.1/com.groupdocs/groupdocs-viewer/21.2/541f695e50f5ed475786402ce0be5978db3a8bb2/groupdocs-viewer-21.2.jar; Unsupported size: 19732345 for JarEntry META-INF/MANIFEST.MF. Allowed max size: 8000000 bytes | ||
``` | ||
|
||
The issue arises from Java's file size limit, which is set at 8,000,000 bytes by default. You can resolve this using the `-Djdk.jar.maxSignatureFileSize=8000000` option in your Virtual Machine settings. Change the `8,000,000` to the required file size limit. | ||
|
||
|
||
{{< tabs "example1">}} | ||
{{< tab "Windows" >}} | ||
```sh | ||
SET MAVEN_OPTS="-Djdk.jar.maxSignatureFileSize=25000000" | ||
mvn clean compile spring-boot:run | ||
``` | ||
{{< /tab >}} | ||
{{< tab "Linux" >}} | ||
```sh | ||
export MAVEN_OPTS="-Djdk.jar.maxSignatureFileSize=25000000" | ||
mvn clean compile spring-boot:run | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
net/developer-guide/loading-documents/loading-external-resources.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
id: loading-external-resources | ||
url: viewer/net/loading-external-resources | ||
title: Loading of external resources containing by a document | ||
weight: 5 | ||
keywords: set timeout, Groupdocs.Viewer | ||
description: "This article explains how to manage loading of external resources contained by a document with GroupDocs.Viewer within your .NET applications." | ||
productName: GroupDocs.Viewer for .NET | ||
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 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. | ||
|
||
## Skip loading of external resources | ||
|
||
The following code snippet shows how to deny loading of external resources: | ||
|
||
{{< tabs "example3">}} | ||
{{< tab "C#" >}} | ||
```csharp | ||
LoadOptions loadOptions = new LoadOptions(); | ||
loadOptions.SkipExternalResources = true; // Skip loading of external resources | ||
using (Viewer viewer = new Viewer("business-flyer.docx", loadOptions)) | ||
{ | ||
HtmlViewOptions viewOptions = | ||
HtmlViewOptions.ForEmbeddedResources(); | ||
|
||
viewer.View(viewOptions); | ||
} | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} | ||
|
||
The following images show the output file with and without external resources (see top right corner): | ||
|
||
| loadOptions.SkipExternalResources = false | loadOptions.SkipExternalResources = true | | ||
| --- | --- | | ||
|  |  | | ||
|
||
## Manage a safelist for loading external resources | ||
|
||
The following code snippet shows how to allow loading of external resources from specific URLs: | ||
|
||
{{< tabs "example2">}} | ||
{{< tab "C#" >}} | ||
```csharp | ||
LoadOptions loadOptions = new LoadOptions(); | ||
loadOptions.SkipExternalResources = true; // Skip loading of all external resources | ||
loadOptions.WhitelistedResources.Add("avatars.githubusercontent.com"); //Enable loading of external resources that has `avatars.githubusercontent.com` fragment in resource URL. | ||
using (Viewer viewer = new Viewer("business-flyer.docx", loadOptions)) | ||
{ | ||
HtmlViewOptions viewOptions = | ||
HtmlViewOptions.ForEmbeddedResources(); | ||
|
||
viewer.View(viewOptions); | ||
} | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} | ||
|
||
## Set timeout for loading of external resources | ||
|
||
The default timeout is 30 seconds. GroupDocs.Viewer allows you to change this value. | ||
|
||
The following code snippet shows how to set a timeout to load external resources: | ||
|
||
{{< tabs "example1">}} | ||
{{< tab "C#" >}} | ||
```csharp | ||
// Specify a timeout. | ||
LoadOptions loadOptions = new LoadOptions(); | ||
loadOptions.ResourceLoadingTimeout = TimeSpan.FromSeconds(5); | ||
// Render a file. | ||
using (Viewer viewer = new Viewer("sample.docx", loadOptions)) | ||
{ | ||
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources(); | ||
viewer.View(viewOptions); | ||
} | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} |
35 changes: 0 additions & 35 deletions
35
...documents/set-timeout-for-loading-external-resources-contained-by-a-document.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+72.2 KB
net/images/rendering-basics/render-spreadsheets/page-breake-vs-print-area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.