Jelajahi Produk kami

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

Instalasi

Paket ini tersedia di nuget.org dan dapat diinstal melalui Package Manager Console dengan perintah berikut:

NuGet\Install-Package GroupDocs.Annotation-Cloud

Version NuGet NuGet-GroupDocsCloud


Persyaratan

  • .NET Framework 2.0 atau .NET Standard 2.0
  • NuGet
  • System.Web saat menargetkan .NET Framework 2.0
  • Kredensial GroupDocs Cloud — Client ID and Client Secret dari Dasbor

Mulai cepat

Dapatkan kredensial API Anda

Untuk menggunakan GroupDocs.Annotation Cloud, daftar di Dasbor GroupDocs.Cloud dan dapatkan Client ID serta Client Secret.

Inisialisasi API

Gunakan kode berikut untuk mulai menggunakan GroupDocs.Annotation Cloud SDK for .NET.

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);

Lihat contoh lengkap di Constants.cs.

Menambahkan sorotan teks

Contoh ini menambahkan sorotan teks ke dokumen Word di penyimpanan cloud.

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);

Lihat contoh lengkap di AddTextHighlightAnnotation.cs.

Menambahkan anotasi area

Contoh ini menambahkan anotasi area ke halaman pertama.

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);

Lihat contoh lengkap di AddAreaAnnotation.cs.

Menghapus anotasi

Contoh ini menghapus anotasi 1, 2, dan 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);

Lihat contoh lengkap di DeleteAnnotations.cs.

Mengekstrak anotasi

Contoh ini membaca anotasi dari dokumen.

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);

Lihat contoh lengkap di ExtractAnnotations.cs.

Mendapatkan format file yang didukung

Ambil format yang diterima API annotation.

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);

Lihat contoh lengkap di GetSupportedFormats.cs.

Contoh di GitHub

Repositori GroupDocs.Annotation Cloud .NET Examples berisi contoh siap jalan yang mencakup:

CategoryExamples
TambahArea, panah, jarak, elips, gambar, tautan, titik, poliline, sorotan teks, garis bawah, coretan, redaksi, tanda air
KelolaHapus anotasi, ekstrak anotasi, anotasi langsung
InfoInformasi dokumen, format yang didukung
PratinjauAmbil halaman, hapus halaman

Cara menjalankan contoh

  1. Klon atau unduh repositori contoh
  2. Buka Examples/GroupDocs.Annotation.Cloud.Examples.sln di Visual Studio 2017 atau yang lebih baru
  3. Klik kanan solusi dan pilih Enable NuGet Package Restore
  4. Edit Examples/GroupDocs.Annotation.Cloud.Examples/Program.cs lalu atur Constants.MyClientId dan Constants.MyClientSecret
  5. Bangun dan jalankan

Untuk detail selengkapnya, kunjungi Getting Started.


Product Docs Swagger Examples Blog Support Dashboard




 Indonesia