-
Notifications
You must be signed in to change notification settings - Fork 0
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
dc36482
commit 5c65158
Showing
115 changed files
with
5,301 additions
and
0 deletions.
There are no files selected for viewing
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,51 @@ | ||
--- | ||
title: Comprehensive Tutorials and Examples of GroupDocs.Viewer for .NET | ||
linktitle: GroupDocs.Viewer for .NET Tutorials | ||
type: docs | ||
weight: 10 | ||
url: /net/ | ||
description: | ||
is_root: true | ||
--- | ||
|
||
### [Loading Documents](./loading-documents/) | ||
|
||
### [Advanced Loading Options](./advanced-loading/) | ||
|
||
### [Advanced Usage (Caching)](./advanced-usage-caching/) | ||
|
||
### [Rendering Options](./rendering-options/) | ||
|
||
### [Rendering Archive Files](./rendering-archive-files/) | ||
|
||
### [Rendering CAD Drawings](./rendering-cad-drawings/) | ||
|
||
### [Getting Started](./getting-started/) | ||
|
||
### [Rendering Email Messages](./rendering-email-messages/) | ||
|
||
### [Image Rendering](./image-rendering/) | ||
|
||
### [Rendering Documents to PDF](./rendering-documents-pdf/) | ||
|
||
### [Rendering Documents to Images](./rendering-documents-images/) | ||
|
||
### [Rendering Documents to HTML](./rendering-documents-html/) | ||
|
||
### [Processing Document Attachments](./processing-document-attachments/) | ||
|
||
### [Rendering Text Files](./rendering-text-files/) | ||
|
||
### [Rendering Visio Documents](./rendering-visio-documents/) | ||
|
||
### [Rendering Web Documents](./rendering-web-documents/) | ||
|
||
### [Rendering Word Processing Documents](./rendering-word-processing-documents/) | ||
|
||
### [Spreadsheet Rendering Options](./spreadsheet-rendering-options/) | ||
|
||
### [PDF Rendering Options](./pdf-rendering-options/) | ||
|
||
### [Rendering Outlook Data Files (PST, OST)](./rendering-outlook-data-files/) | ||
|
||
### [Rendering Microsoft Project Documents](./groupdocs-viewer-net-rendering-ms-project-documents/) |
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,15 @@ | ||
--- | ||
title: Advanced Loading Options | ||
linktitle: Advanced Loading Options | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 21 | ||
url: /net/advanced-loading/ | ||
--- | ||
|
||
## Advanced Loading Options Tutorials | ||
### [Specify File Type When Loading Documents](./specify-file-type/) | ||
### [Load Documents with Specific Encoding](./load-documents-encoding/) | ||
### [Load Password-Protected Documents](./load-password-protected-document/) | ||
### [Set Resource Loading Timeout (Advanced)](./set-resource-loading-timeout/) |
50 changes: 50 additions & 0 deletions
50
content/english/net/advanced-loading/load-documents-encoding/_index.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,50 @@ | ||
--- | ||
title: Load Documents with Specific Encoding | ||
linktitle: Load Documents with Specific Encoding | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 11 | ||
url: /net/advanced-loading/load-documents-encoding/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.IO; | ||
using System.Text; | ||
using GroupDocs.Viewer.Options; | ||
|
||
namespace GroupDocs.Viewer.Examples.CSharp.AdvancedUsage.Loading | ||
{ | ||
/// <summary> | ||
/// This example demonstrates how to specify encoding. | ||
/// </summary> | ||
class LoadDocumentsWithEncoding | ||
{ | ||
public static void Run() | ||
{ | ||
string filePath = TestFiles.SAMPLE_TXT_SHIFT_JS_ENCODED; | ||
string outputDirectory = "Your Document Directory"; | ||
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html"); | ||
|
||
LoadOptions loadOptions = new LoadOptions | ||
{ | ||
Encoding = Encoding.GetEncoding("shift_jis") | ||
}; | ||
|
||
using (Viewer viewer = new Viewer(filePath, loadOptions)) | ||
{ | ||
HtmlViewOptions options = | ||
HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat); | ||
|
||
viewer.View(options); | ||
} | ||
|
||
Console.WriteLine($"\nSource document rendered successfully.\nCheck output in {outputDirectory}."); | ||
} | ||
} | ||
} | ||
|
||
|
||
``` |
45 changes: 45 additions & 0 deletions
45
content/english/net/advanced-loading/load-password-protected-document/_index.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,45 @@ | ||
--- | ||
title: Load Password-Protected Documents | ||
linktitle: Load Password-Protected Documents | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 12 | ||
url: /net/advanced-loading/load-password-protected-document/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.IO; | ||
using GroupDocs.Viewer.Options; | ||
|
||
namespace GroupDocs.Viewer.Examples.CSharp.AdvancedUsage.Loading | ||
{ | ||
/// <summary> | ||
/// This example demonstrates how to render password-protected document. | ||
/// </summary> | ||
class LoadPasswordProtectedDocument | ||
{ | ||
public static void Run() | ||
{ | ||
string outputDirectory = "Your Document Directory"; | ||
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html"); | ||
|
||
LoadOptions loadOptions = new LoadOptions | ||
{ | ||
Password = "12345" | ||
}; | ||
|
||
using (Viewer viewer = new Viewer(TestFiles.SAMPLE_DOCX_WITH_PASSWORD, loadOptions)) | ||
{ | ||
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat); | ||
viewer.View(options); | ||
} | ||
|
||
Console.WriteLine($"\nSource document rendered successfully.\nCheck output in {outputDirectory}."); | ||
} | ||
} | ||
} | ||
|
||
``` |
45 changes: 45 additions & 0 deletions
45
content/english/net/advanced-loading/set-resource-loading-timeout/_index.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,45 @@ | ||
--- | ||
title: Set Resource Loading Timeout (Advanced) | ||
linktitle: Set Resource Loading Timeout (Advanced) | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 13 | ||
url: /net/advanced-loading/set-resource-loading-timeout/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.IO; | ||
using GroupDocs.Viewer.Options; | ||
|
||
namespace GroupDocs.Viewer.Examples.CSharp.AdvancedUsage.Loading | ||
{ | ||
/// <summary> | ||
/// This example demonstrates how to set timeout for loading external resources contained by a document. | ||
/// </summary> | ||
class SetResourceLoadingTimeout | ||
{ | ||
public static void Run() | ||
{ | ||
string outputDirectory = "Your Document Directory"; | ||
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html"); | ||
|
||
LoadOptions loadOptions = new LoadOptions | ||
{ | ||
ResourceLoadingTimeout = TimeSpan.FromSeconds(5) | ||
}; | ||
|
||
using (Viewer viewer = new Viewer(TestFiles.WITH_EXTERNAL_IMAGE_DOC, loadOptions)) | ||
{ | ||
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat); | ||
viewer.View(options); | ||
} | ||
|
||
Console.WriteLine($"\nSource document rendered successfully.\nCheck output in {outputDirectory}."); | ||
} | ||
} | ||
} | ||
|
||
``` |
45 changes: 45 additions & 0 deletions
45
content/english/net/advanced-loading/specify-file-type/_index.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,45 @@ | ||
--- | ||
title: Specify File Type When Loading Documents | ||
linktitle: Specify File Type When Loading Documents | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 10 | ||
url: /net/advanced-loading/specify-file-type/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.IO; | ||
using GroupDocs.Viewer.Options; | ||
|
||
namespace GroupDocs.Viewer.Examples.CSharp.AdvancedUsage.Loading | ||
{ | ||
/// <summary> | ||
/// This example demonstrates how to specify file type when loading document. | ||
/// </summary> | ||
class SpecifyFileTypeWhenLoadingDocument | ||
{ | ||
public static void Run() | ||
{ | ||
string outputDirectory = "Your Document Directory"; | ||
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html"); | ||
|
||
LoadOptions loadOptions = new LoadOptions | ||
{ | ||
FileType = FileType.DOCX | ||
}; | ||
|
||
using (Viewer viewer = new Viewer(TestFiles.SAMPLE_DOCX, loadOptions)) | ||
{ | ||
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat); | ||
viewer.View(options); | ||
} | ||
|
||
Console.WriteLine($"\nSource document rendered successfully.\nCheck output in {outputDirectory}."); | ||
} | ||
} | ||
} | ||
|
||
``` |
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,12 @@ | ||
--- | ||
title: Advanced Usage (Caching) | ||
linktitle: Advanced Usage (Caching) | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 22 | ||
url: /net/advanced-usage-caching/ | ||
--- | ||
|
||
## Advanced Usage (Caching) Tutorials | ||
### [Enable Caching for Faster Document Processing](./enable-caching/) |
57 changes: 57 additions & 0 deletions
57
content/english/net/advanced-usage-caching/enable-caching/_index.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,57 @@ | ||
--- | ||
title: Enable Caching for Faster Document Processing | ||
linktitle: Enable Caching for Faster Document Processing | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 10 | ||
url: /net/advanced-usage-caching/enable-caching/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using GroupDocs.Viewer.Caching; | ||
using GroupDocs.Viewer.Options; | ||
|
||
namespace GroupDocs.Viewer.Examples.CSharp.AdvancedUsage.Caching | ||
{ | ||
/// <summary> | ||
/// This example demonstrates how to enable cache when render document. | ||
/// </summary> | ||
class UseCacheWhenProcessingDocuments | ||
{ | ||
public static void Run() | ||
{ | ||
string outputDirectory = "Your Document Directory"; | ||
string cachePath = Path.Combine(outputDirectory, "cache"); | ||
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html"); | ||
|
||
FileCache cache = new FileCache(cachePath); | ||
ViewerSettings settings = new ViewerSettings(cache); | ||
|
||
using (Viewer viewer = new Viewer(TestFiles.SAMPLE_DOCX, settings)) | ||
{ | ||
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat); | ||
|
||
Stopwatch stopWatch = Stopwatch.StartNew(); | ||
viewer.View(options); | ||
stopWatch.Stop(); | ||
|
||
Console.WriteLine("Time taken on first call to View method {0} (ms).", stopWatch.ElapsedMilliseconds); | ||
|
||
stopWatch.Restart(); | ||
viewer.View(options); | ||
stopWatch.Stop(); | ||
|
||
Console.WriteLine("Time taken on second call to View method {0} (ms).", stopWatch.ElapsedMilliseconds); | ||
} | ||
|
||
Console.WriteLine($"\nSource document rendered successfully.\nCheck output in {outputDirectory}."); | ||
} | ||
} | ||
} | ||
|
||
``` |
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,14 @@ | ||
--- | ||
title: Getting Started | ||
linktitle: Getting Started | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 26 | ||
url: /net/getting-started/ | ||
--- | ||
|
||
## Getting Started Tutorials | ||
### [Set License from File](./set-license-from-file/) | ||
### [Set License from Stream](./set-license-from-stream/) | ||
### [Set Metered License](./set-metered-license/) |
48 changes: 48 additions & 0 deletions
48
content/english/net/getting-started/set-license-from-file/_index.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,48 @@ | ||
--- | ||
title: Set License from File | ||
linktitle: Set License from File | ||
second_title: GroupDocs.Viewer .NET API | ||
description: | ||
type: docs | ||
weight: 10 | ||
url: /net/getting-started/set-license-from-file/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.IO; | ||
|
||
namespace GroupDocs.Viewer.Examples.CSharp.QuickStart | ||
{ | ||
/// <summary> | ||
/// This example demonstrates how to set license from file. | ||
/// </summary> | ||
/// <remarks> | ||
/// The SetLicense method attempts to set a license from several locations relative to the executable and GroupDocs.Viewer.dll. | ||
/// You can also use the additional overload to load a license from a stream, this is useful for instance when the | ||
/// License is stored as an embedded resource. | ||
/// </remarks> | ||
class SetLicenseFromFile | ||
{ | ||
public static void Run() | ||
{ | ||
if (File.Exists(Utils.LicensePath)) | ||
{ | ||
License license = new License(); | ||
license.SetLicense(Utils.LicensePath); | ||
|
||
Console.WriteLine("License set successfully."); | ||
} | ||
else | ||
{ | ||
Console.WriteLine("\nWe do not ship any license with this example. " + | ||
"\nVisit the GroupDocs site to obtain either a temporary or permanent license. " + | ||
"\nLearn more about licensing at https://purchase.groupdocs.com/faqs/licensing. " + | ||
"\nLearn how to request temporary license at https://purchase.groupdocs.com/temporary-license."); | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` |
Oops, something went wrong.