Blader door onze producten

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.


Product Docs Swagger Examples Blog Support Dashboard

Installation

Das Paket ist verfügbar auf nuget.org und kann über die Paketmanager-Konsole mit dem folgenden Befehl installiert werden:

NuGet\Install-Package GroupDocs.Annotation-Cloud

Version NuGet NuGet-GroupDocsCloud


Anforderungen

  • .NET Framework 2.0 oder .NET Standard 2.0
  • NuGet
  • System.Web bei Zielplattform .NET Framework 2.0
  • GroupDocs Cloud-Anmeldeinformationen — Client ID and Client Secret aus dem Dashboard

Schnellstart

API-Anmeldeinformationen abrufen

Um GroupDocs.Annotation Cloud zu verwenden, registrieren Sie sich im GroupDocs.Cloud-Dashboard und rufen Sie Client ID und Client Secret ab.

API initialisieren

Verwenden Sie den folgenden Code, um das GroupDocs.Annotation Cloud SDK for .NET zu verwenden.

using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;

string MyClientId = "YourClientId";
string MyClientSecret = "YourClientSecret";

var config = new Configuration(MyClientId, MyClientSecret);
config.ApiBaseUrl = "https://api.groupdocs.cloud";

var apiInstance = new AnnotateApi(config);

Das vollständige Beispiel finden Sie in Constants.cs.

Texthervorhebung hinzufügen

Dieses Beispiel fügt einem Word-Dokument im Cloud-Speicher eine Texthervorhebung hinzu.

using System;
using System.Collections.Generic;
using System.Linq;
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var options = new AnnotateOptions
{
    FileInfo = new FileInfo { FilePath = "one-page.docx" },
    Annotations = new List<AnnotationInfo>
    {
        new AnnotationInfo
        {
            Points = new List<Point>
            {
                new Point { X = 80, Y = 730 }, new Point { X = 240, Y = 730 },
                new Point { X = 80, Y = 650 }, new Point { X = 240, Y = 650 }
            },
            BackgroundColor = 65535,
            PageNumber = 0,
            Type = AnnotationInfo.TypeEnum.TextHighlight,
            Text = "This is text highlight annotation",
            CreatorName = "Anonym A."
        }
    },
    OutputPath = "Output/output.docx"
};

var link = apiInstance.Annotate(new AnnotateRequest(options));
Console.WriteLine("AddTextHighlightAnnotation: Text highlight Annotation added: " + link.Title);

Das vollständige Beispiel finden Sie in AddTextHighlightAnnotation.cs.

Bereichsanmerkung hinzufügen

Dieses Beispiel fügt der ersten Seite eine Bereichsanmerkung hinzu.

using System.Collections.Generic;
using System.Linq;
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var options = new AnnotateOptions
{
    FileInfo = new FileInfo { FilePath = "one-page.docx" },
    Annotations = new List<AnnotationInfo>
    {
        new AnnotationInfo
        {
            AnnotationPosition = new Point { X = 1, Y = 1 },
            Box = new Rectangle { X = 100, Y = 100, Width = 100, Height = 100 },
            PageNumber = 0,
            Type = AnnotationInfo.TypeEnum.Area,
            Text = "This is area annotation",
            CreatorName = "Anonym A."
        }
    },
    OutputPath = "Output/output.docx"
};

var link = apiInstance.Annotate(new AnnotateRequest(options));
Console.WriteLine("AddAreaAnnotation: Area Annotation added: " + link.Title);

Das vollständige Beispiel finden Sie in AddAreaAnnotation.cs.

Anmerkungen löschen

Dieses Beispiel entfernt die Anmerkungen 1, 2 und 3.

using System.Collections.Generic;
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var options = new RemoveOptions
{
    FileInfo = new FileInfo { FilePath = "one-page.docx" },
    AnnotationIds = new List<int?> { 1, 2, 3 },
    OutputPath = "Output/output.docx"
};

var link = apiInstance.RemoveAnnotations(new RemoveAnnotationsRequest(options));
Console.WriteLine("DeleteAnnotations: Annotations deleted: " + link.Title);

Das vollständige Beispiel finden Sie in DeleteAnnotations.cs.

Anmerkungen extrahieren

Dieses Beispiel liest die Anmerkungen aus einem Dokument.

using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var response = apiInstance.Extract(new ExtractRequest(new FileInfo { FilePath = "input.docx" }));
Console.WriteLine("ExtractAnnotations: annotations count = " + response.Count);

Das vollständige Beispiel finden Sie in ExtractAnnotations.cs.

Unterstützte Dateiformate abrufen

Rufen Sie die Formate ab, die die annotation-API akzeptiert.

using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new InfoApi(config);

var response = apiInstance.GetSupportedFileFormats();
Console.WriteLine("GetSupportedFormats: formats count = " + response.Formats.Count);

Das vollständige Beispiel finden Sie in GetSupportedFormats.cs.

Beispiele auf GitHub

Das Repository GroupDocs.Annotation Cloud .NET Examples enthält sofort ausführbare Beispiele zu folgenden Themen:

CategoryExamples
HinzufügenBereich, Pfeil, Abstand, Ellipse, Bild, Link, Punkt, Polylinie, Texthervorhebung, Unterstreichung, Durchstreichung, Schwärzung, Wasserzeichen
VerwaltenAnmerkungen löschen, Anmerkungen extrahieren, direkte Anmerkung
InfoDokumentinformationen, unterstützte Formate
VorschauSeiten abrufen, Seiten löschen

Beispiele ausführen

  1. Klonen oder laden Sie das Beispiel-Repository herunter
  2. Öffnen Sie Examples/GroupDocs.Annotation.Cloud.Examples.sln in Visual Studio 2017 oder höher
  3. Klicken Sie mit der rechten Maustaste auf die Projektmappe und wählen Sie Enable NuGet Package Restore
  4. Bearbeiten Sie Examples/GroupDocs.Annotation.Cloud.Examples/Program.cs und legen Sie Constants.MyClientId und Constants.MyClientSecret fest
  5. Erstellen und ausführen

Weitere Informationen finden Sie unter Getting Started.


Product Docs Swagger Examples Blog Support Dashboard




 Deutsch