-
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
74c5206
commit 89c753a
Showing
63 changed files
with
3,016 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,23 @@ | ||
--- | ||
title: Tutorials and Examples of GroupDocs.Annotation for .NET | ||
linktitle: GroupDocs.Annotation for .NET Tutorials | ||
type: docs | ||
weight: 10 | ||
url: /net/ | ||
description: | ||
is_root: true | ||
--- | ||
|
||
### [Document Loading Essentials](./document-loading-essentials/) | ||
|
||
### [Getting Started](./getting-started/) | ||
|
||
### [Advanced Usage](./advanced-usage/) | ||
|
||
### [Unlocking Annotation Power](./unlocking-annotation-power/) | ||
|
||
### [Document Components](./document-components/) | ||
|
||
### [Removing Annotations](./removing-annotations/) | ||
|
||
### [Applying Licenses](./applying-licenses/) |
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,25 @@ | ||
--- | ||
title: Advanced Usage | ||
linktitle: Advanced Usage | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 22 | ||
url: /net/advanced-usage/ | ||
--- | ||
|
||
## Advanced Usage Tutorials | ||
### [Change Image Quality](./change-image-quality/) | ||
### [Export Annotations from XML File](./export-annotations-xml-file/) | ||
### [Generate Document Pages Preview](./generate-document-pages-preview/) | ||
### [Generate Preview without Annotations](./generate-preview-without-annotations/) | ||
### [Generate Preview without Comments](./generate-preview-without-comments/) | ||
### [Generate Preview Worksheet Columns](./generate-preview-worksheet-columns/) | ||
### [Get All Version Keys on Document](./get-all-version-keys-document/) | ||
### [Get Document Text Content Information](./get-document-text-content-information/) | ||
### [Get List of Annotations using Version Key](./get-list-annotations-version-key/) | ||
### [Import Annotations from Document](./import-annotations-from-document/) | ||
### [Loading Custom Fonts](./loading-custom-fonts/) | ||
### [Put Image Annotation over Text](./put-image-annotation-over-text/) | ||
### [Rotating PDF Documents](./rotating-pdf-documents/) | ||
### [Set Document Preview Resolution](./set-document-preview-resolution/) |
35 changes: 35 additions & 0 deletions
35
content/english/net/advanced-usage/change-image-quality/_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,35 @@ | ||
--- | ||
title: Change Image Quality | ||
linktitle: Change Image Quality | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 10 | ||
url: /net/advanced-usage/change-image-quality/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.IO; | ||
using GroupDocs.Annotation; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage | ||
{ | ||
class ChangeImageQuality | ||
{ | ||
public static void Run() | ||
{ | ||
using (Annotator annotator = new Annotator("input.pdf-file")) // specify the path to the input PDF file | ||
{ | ||
string dataDir = "input.pdf"; // specify the path to the input PDF file | ||
string data = "image.jpg"; // the path to the JPG file | ||
int pageNumber = 1; // set the page where the image will be inserted | ||
int imageQuality = 10; // set image quality | ||
annotator.Document.AddImageToDocument(dataDir, data, pageNumber, imageQuality); | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` |
32 changes: 32 additions & 0 deletions
32
content/english/net/advanced-usage/export-annotations-xml-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,32 @@ | ||
--- | ||
title: Export Annotations from XML File | ||
linktitle: Export Annotations from XML File | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 11 | ||
url: /net/advanced-usage/export-annotations-xml-file/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.IO; | ||
using GroupDocs.Annotation; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage | ||
{ | ||
class ExportAnnotationsFromXMLFile | ||
{ | ||
public static void Run() | ||
{ | ||
using (Annotator annotator = new Annotator("input.pdf-file")) // specify the path to the input PDF file | ||
{ | ||
annotator.ExportAnnotationsFromXMLFile("input.XML-file"); // specify the path to the input XML file | ||
annotator.Save("result_export"); | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` |
42 changes: 42 additions & 0 deletions
42
content/english/net/advanced-usage/generate-document-pages-preview/_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,42 @@ | ||
--- | ||
title: Generate Document Pages Preview | ||
linktitle: Generate Document Pages Preview | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 12 | ||
url: /net/advanced-usage/generate-document-pages-preview/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using GroupDocs.Annotation.Options; | ||
using System; | ||
using System.IO; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage | ||
{ | ||
/// <summary> | ||
/// This example demonstrates annotating generating previews from document | ||
/// </summary> | ||
internal class GenerateDocumentPagesPreview | ||
{ | ||
public static void Run() | ||
{ | ||
using (Annotator annotator = new Annotator("input.pdf")) | ||
{ | ||
PreviewOptions previewOptions = new PreviewOptions(pageNumber => | ||
{ | ||
var pagePath = Path.Combine(Constants.GetOutputDirectoryPath(), $"result_{pageNumber}.png"); | ||
return File.Create(pagePath); | ||
}); | ||
previewOptions.PreviewFormat = PreviewFormats.PNG; | ||
|
||
previewOptions.PageNumbers = new int[] { 1, 2, 3, 4 }; | ||
annotator.Document.GeneratePreview(previewOptions); | ||
} | ||
Console.WriteLine($"\nDocument previews generated successfully.\nCheck output in {Constants.GetOutputDirectoryPath()}."); | ||
} | ||
} | ||
} | ||
``` |
42 changes: 42 additions & 0 deletions
42
content/english/net/advanced-usage/generate-preview-without-annotations/_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,42 @@ | ||
--- | ||
title: Generate Preview without Annotations | ||
linktitle: Generate Preview without Annotations | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 13 | ||
url: /net/advanced-usage/generate-preview-without-annotations/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System.IO; | ||
using GroupDocs.Annotation.Options; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp | ||
{ | ||
/// <summary> | ||
/// This example demonstrates generating preview of document without rendering comments | ||
/// </summary> | ||
class GeneratePreviewWithoutAnnotations | ||
{ | ||
public static void Run() | ||
{ | ||
using (Annotator annotator = new Annotator("annotated.pdf"_DOCX)) | ||
{ | ||
PreviewOptions previewOptions = new PreviewOptions(pageNumber => | ||
{ | ||
var pagePath = $"result{pageNumber}.png"; | ||
return File.Create(pagePath); | ||
}); | ||
|
||
previewOptions.PreviewFormat = PreviewFormats.PNG; | ||
previewOptions.PageNumbers = new int[] {1, 2, 3, 4, 5, 6}; | ||
previewOptions.RenderAnnotations = false; | ||
annotator.Document.GeneratePreview(previewOptions); | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` |
44 changes: 44 additions & 0 deletions
44
content/english/net/advanced-usage/generate-preview-without-comments/_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,44 @@ | ||
--- | ||
title: Generate Preview without Comments | ||
linktitle: Generate Preview without Comments | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 14 | ||
url: /net/advanced-usage/generate-preview-without-comments/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Text; | ||
using GroupDocs.Annotation.Options; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage | ||
{ | ||
/// <summary> | ||
/// This example demonstrates generating preview of document without rendering comments | ||
/// </summary> | ||
class GeneratePreviewWithoutComments | ||
{ | ||
public static void Run() | ||
{ | ||
using (Annotator annotator = new Annotator("annotated.pdf"_DOCX)) | ||
{ | ||
PreviewOptions previewOptions = new PreviewOptions(pageNumber => | ||
{ | ||
var pagePath = $"result{pageNumber}.png"; | ||
return File.Create(pagePath); | ||
}); | ||
previewOptions.PreviewFormat = PreviewFormats.PNG; | ||
previewOptions.PageNumbers = new int[] { 1, 2, 3, 4, 5, 6 }; | ||
previewOptions.RenderComments = false; | ||
annotator.Document.GeneratePreview(previewOptions); | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` |
43 changes: 43 additions & 0 deletions
43
content/english/net/advanced-usage/generate-preview-worksheet-columns/_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,43 @@ | ||
--- | ||
title: Generate Preview Worksheet Columns | ||
linktitle: Generate Preview Worksheet Columns | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 15 | ||
url: /net/advanced-usage/generate-preview-worksheet-columns/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using GroupDocs.Annotation; | ||
using GroupDocs.Annotation.Options; | ||
using System; | ||
using System.IO; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage | ||
{ | ||
/// <summary> | ||
/// This example demonstrates generating previews from document with specified worksheet columns | ||
/// </summary> | ||
internal class GeneratePreviewWorksheetColumns | ||
{ | ||
public static void Run() | ||
{ | ||
PreviewOptions previewOptions = | ||
new PreviewOptions( | ||
pageNumber => new FileStream(Path.Combine(Constants.GetOutputDirectoryPath(), $"cells_page{pageNumber}.png"), FileMode.Create), | ||
(number, stream) => stream.Dispose() | ||
); | ||
previewOptions.WorksheetColumns.Add(new WorksheetColumnsRange("Sheet1", 2, 3)); | ||
previewOptions.WorksheetColumns.Add(new WorksheetColumnsRange("Sheet1", 1, 1)); | ||
|
||
using (Annotator annotator = new Annotator("input.xlsx")) | ||
{ | ||
annotator.Document.GeneratePreview(previewOptions); | ||
} | ||
Console.WriteLine($"\nDocument previews generated successfully.\nCheck output in {Constants.GetOutputDirectoryPath()}."); | ||
} | ||
} | ||
} | ||
``` |
34 changes: 34 additions & 0 deletions
34
content/english/net/advanced-usage/get-all-version-keys-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,34 @@ | ||
--- | ||
title: Get All Version Keys on Document | ||
linktitle: Get All Version Keys on Document | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 16 | ||
url: /net/advanced-usage/get-all-version-keys-document/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage | ||
{ | ||
/// <summary> | ||
/// This example demonstrates getting all version keys from document | ||
/// </summary> | ||
class GetAllVersionKeysOnDocument | ||
{ | ||
public static void Run() | ||
{ | ||
using (Annotator annotator = new Annotator("annotated_with_versions.pdf")) | ||
{ | ||
List<object> versionKeys = annotator.GetVersionsList(); | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` |
47 changes: 47 additions & 0 deletions
47
content/english/net/advanced-usage/get-document-text-content-information/_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,47 @@ | ||
--- | ||
title: Get Document Text Content Information | ||
linktitle: Get Document Text Content Information | ||
second_title: GroupDocs.Annotation .NET API | ||
description: | ||
type: docs | ||
weight: 17 | ||
url: /net/advanced-usage/get-document-text-content-information/ | ||
--- | ||
|
||
## Complete Source Code | ||
```csharp | ||
using System; | ||
using GroupDocs.Annotation.Models; | ||
|
||
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage | ||
{ | ||
/// <summary> | ||
/// This example demonstrates how to get an information about document's text content | ||
/// </summary> | ||
class GetDocumentTextContentInformation | ||
{ | ||
public static void Run() | ||
{ | ||
using (Annotator annotator = new Annotator("annotated.pdf"_DOCX)) | ||
{ | ||
IDocumentInfo documentInfo = annotator.Document.GetDocumentInfo(); | ||
|
||
foreach (PageInfo page in documentInfo.PagesInfo) | ||
{ | ||
//Here you can get information about page through the 'page' object. | ||
Console.WriteLine("Page number {0}, width: {1} and height: {2}", page.PageNumber, page.Width, page.Height); | ||
|
||
foreach (TextLineInfo textLine in page.TextLines) | ||
{ | ||
//Here you can get information about every text line on page, through the 'textLine' object. | ||
Console.WriteLine("\tText line. '{0}'", textLine.Text); | ||
Console.WriteLine("\t\tText width {0} and height {1}. Top indent: {2}, left indent: {3}", | ||
textLine.Width, textLine.Height, textLine.TopIndent, textLine.LeftIndent); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` |
Oops, something went wrong.