Skip to content

Commit

Permalink
Embedded license for .NET, max file size for Java (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel-A-Sokolov committed Nov 7, 2023
1 parent 9d28d72 commit 9aeacd3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ export MAVEN_OPTS="-Djdk.jar.maxSignatureFileSize=25000000"
mvn clean compile spring-boot:run
```
{{< /tab >}}
{{< /tabs >}}
{{< /tabs >}}

{{< alert style="info" >}}
If needed, use the `JAVA_OPTS` or `JAVA_TOOL_OPTIONS` instead of `MAVEN_OPTS`.
{{< /alert >}}
14 changes: 7 additions & 7 deletions net/getting-started/licensing-and-subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Licenses can be applied from different locations:
* The folder containing the assembly that called _GroupDocs.Viewer.dll_
* The folder containing the entry assembly (your _.exe_)
* As a Metered License that allows you to pay for your usage. For details, see the [Metered Licensing FAQ](https://purchase.groupdocs.com/faqs/licensing/metered/).
* As embedded resource
* As an embedded resource
When you reference _GroupDocs.Viewer.dll_ in the application, the library is copied to your output directory (unless **Copy Local** in the properties for that entry is set to false). The easiest way to set a license is often to place the license file in the same folder as _GroupDocs.Viewer.dll_ and specify just the filename without the path.

Use the [SetLicense](https://reference.groupdocs.com/viewer/net/groupdocs.viewer/license/setlicense/) method to license a component.
Expand Down Expand Up @@ -110,14 +110,14 @@ Console.WriteLine("Credits consumed: " + creditsConsumed);
{{< /tab >}}
{{< /tabs >}}

#### Apply License from embedded resource
#### Apply License from an Embedded Resource

You can set license as embedded resource as an alternative to license file. This is a convenient way because you need just add a license to the project and specify the license name in the SetLicense method, without thinking about the full paths to this file
{{< alert style="info" >}}

Before using embedded license it should be added to project, and in properties of this file set "Build action" to "Embedded Resource". Make sure that license name in embedded resources and string argument in SetLicense method are same
Instead of using a license file, you can install the license as an embedded resource. To do this, add a license to the project and specify the license name in the `SetLicense` method without specifying the full path to this file.

{{< alert style="info" >}}
To use the embedded license, add it to your project and set the **Build Action** property of this file to "Embedded Resource". Ensure that the license name in the embedded resources matches the string parameter of the `SetLicense` method.
{{< /alert >}}

The following code snippet shows how to use the embedded license:

{{< tabs "example4">}}
Expand All @@ -139,7 +139,7 @@ When you buy and download a license from the GroupDocs website, the license file

If Microsoft Windows is set to hide file extensions (which is the default in most installations), the license file will show as "GroupDocs.Viewer.lic" in Windows Explorer. You might assume this is the actual file name and call the `SetLicense` method with "GroupDocs.Viewer.lic", but there is no such file, leading to an exception.

To fix this issue, rename the file to remove the hidden .xml extension. Additionally, we suggest disabling the "Hide extensions" option in Microsoft Windows.
To fix this issue, rename the file to remove the hidden .xml extension. Additionally, we suggest disabling the **Hide extensions** option in Microsoft Windows.

## How to Evaluate GroupDocs.Viewer

Expand Down

0 comments on commit 9aeacd3

Please sign in to comment.