Ürünlerimize göz atın

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

Kurulum

Paket nuget.org adresinde kullanılabilir ve Paket Yöneticisi Konsolu üzerinden şu komutla yüklenebilir:

NuGet\Install-Package GroupDocs.Watermark-Cloud

Version NuGet NuGet-GroupDocsCloud


Gereksinimler

  • .NET Framework 2.0 veya .NET Standard 2.0
  • NuGet
  • .NET Framework 2.0 hedeflenirken System.Web
  • GroupDocs Cloud kimlik bilgileri — panodaki Client ID and Client Secret

Hızlı başlangıç

API kimlik bilgilerinizi alın

GroupDocs.Watermark Cloud kullanmak için GroupDocs.Cloud Panosu üzerinde kaydolun ve Client ID ile Client Secret değerlerini alın.

API’yi başlatma

GroupDocs.Watermark Cloud SDK for .NET kullanmaya başlamak için aşağıdaki kodu kullanın.

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

var configuration = new Configuration("YourClientId", "YourClientSecret");
var apiInstance = new WatermarkApi(configuration);

Tam örneği Common.cs içinde görün.

Metin filigranı ekleme

Bu örnek bir Word belgesine Arial metin filigranı ekler.

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

var configuration = new Configuration("YourClientId", "YourClientSecret");
var apiInstance = new WatermarkApi(configuration);

var options = new WatermarkOptions
{
    FileInfo = new FileInfo { FilePath = "documents/sample.docx" },
    WatermarkDetails = new List<WatermarkDetails>
    {
        new WatermarkDetails
        {
            TextWatermarkOptions = new TextWatermarkOptions
            {
                Text = "New watermark text",
                FontFamilyName = "Arial",
                FontSize = 12d
            }
        }
    }
};

var response = apiInstance.Add(new AddRequest(options));
Console.WriteLine("Resultant file path: " + response.Path);

Tam örneği AddTextWatermarks.cs içinde görün.

Görüntü filigranı ekleme

Bu örnek bir Word belgesine görüntü filigranı ekler.

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

var configuration = new Configuration("YourClientId", "YourClientSecret");
var apiInstance = new WatermarkApi(configuration);

var options = new WatermarkOptions
{
    FileInfo = new FileInfo { FilePath = "documents/sample.docx" },
    WatermarkDetails = new List<WatermarkDetails>
    {
        new WatermarkDetails
        {
            ImageWatermarkOptions = new ImageWatermarkOptions
            {
                Image = new FileInfo { FilePath = "watermark_images/sample_watermark.png" }
            }
        }
    }
};

var response = apiInstance.Add(new AddRequest(options));
Console.WriteLine("Resultant file path: " + response.Path);

Tam örneği AddImageWatermarks.cs içinde görün.

Filigran arama

Bu örnek bir PDF içinde metin filigranı ve görüntü filigranı arar.

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

var configuration = new Configuration("YourClientId", "YourClientSecret");
var apiInstance = new WatermarkApi(configuration);

var options = new SearchOptions
{
    FileInfo = new FileInfo { FilePath = "with_watermarks/sample.pdf" },
    TextSearchCriteria = new TextSearchCriteria { SearchText = "Watermark text" },
    ImageSearchCriteria = new ImageSearchCriteria
    {
        ImageFileInfo = new FileInfo { FilePath = "watermark_images/sample_watermark.png" }
    }
};

var response = apiInstance.Search(new SearchRequest(options));

foreach (var watermark in response.Watermarks)
{
    Console.WriteLine($"Id: {watermark.Id}, Type: {watermark.PossibleWatermarkType}");
}

Tam örneği SearchWatermarks.cs içinde görün.

Filigranları kaldırma

Bu örnek bir PDF’den eşleşen metin ve görüntü filigranlarını kaldırır.

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

var configuration = new Configuration("YourClientId", "YourClientSecret");
var apiInstance = new WatermarkApi(configuration);

var options = new RemoveOptions
{
    FileInfo = new FileInfo { FilePath = "with_watermarks/sample.pdf" },
    TextSearchCriteria = new TextSearchCriteria { SearchText = "Watermark text" },
    ImageSearchCriteria = new ImageSearchCriteria
    {
        ImageFileInfo = new FileInfo { FilePath = "watermark_images/sample_watermark.png" }
    },
    OutputFolder = "removed_watermarks"
};

var response = apiInstance.Remove(new RemoveRequest(options));
Console.WriteLine("Resultant file path: " + response.Path);

Tam örneği RemoveWatermarks.cs içinde görün.

GitHub’daki örnekler

GroupDocs.Watermark Cloud .NET Examples deposu, şunları kapsayan çalışmaya hazır örnekler içerir:

CategoryExamples
FiligranlarMetin ekleme, görüntü ekleme, arama, değiştirme, kaldırma
InfoBelge bilgileri, desteklenen dosya türleri

Örnekleri çalıştırma

  1. örnek deposu deposunu klonlayın veya indirin
  2. Examples/GroupDocs.Watermark.Cloud.Examples.sln dosyasını Visual Studio 2017 veya sonraki bir sürümde açın
  3. Çözüme sağ tıklayın ve Enable NuGet Package Restore öğesini seçin
  4. Examples/GroupDocs.Watermark.Cloud.Examples.CSharp/RunExamples.cs dosyasını düzenleyin ve Common.MyAppSid ile Common.MyAppKey değerlerini ayarlayın
  5. Derleyin ve çalıştırın

Daha fazla ayrıntı için Getting Started sayfasını ziyaret edin.


Product Docs Swagger Examples Blog Support Dashboard



 Türkçe