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.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

インストール
パッケージは nuget.org で公開されています。パッケージ マネージャー コンソールで次のコマンドを実行してインストールできます。
NuGet\Install-Package GroupDocs.Watermark-Cloud

要件
- .NET Framework 2.0 または .NET Standard 2.0
- NuGet
- .NET Framework 2.0 を対象とする場合の System.Web
- GroupDocs Cloud の資格情報 — ダッシュボードの Client ID and Client Secret
クイック スタート
API 資格情報を取得する
GroupDocs.Watermark Cloud を使用するには、GroupDocs.Cloud ダッシュボード で登録し、Client ID と Client Secret を取得します。
API を初期化する
次のコードで GroupDocs.Watermark Cloud SDK for .NET の使用を開始します。
using GroupDocs.Watermark.Cloud.Sdk.Api;
using GroupDocs.Watermark.Cloud.Sdk.Client;
var configuration = new Configuration("YourClientId", "YourClientSecret");
var apiInstance = new WatermarkApi(configuration);
完全な例は Common.cs を参照してください。
テキストの透かしを追加する
この例では、Word 文書に Arial のテキスト透かしを追加します。
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);
完全な例は AddTextWatermarks.cs を参照してください。
画像の透かしを追加する
この例では、Word 文書に画像の透かしを追加します。
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);
完全な例は AddImageWatermarks.cs を参照してください。
透かしを検索する
この例では、PDF 内のテキスト透かしと画像透かしを検索します。
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}");
}
完全な例は SearchWatermarks.cs を参照してください。
透かしを削除する
この例では、一致するテキスト透かしと画像透かしを PDF から削除します。
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);
完全な例は RemoveWatermarks.cs を参照してください。
GitHub の例
GroupDocs.Watermark Cloud .NET Examples リポジトリには、次を扱うすぐに実行できる例があります。
| Category | Examples |
|---|
| 透かし | テキストの追加、画像の追加、検索、置換、削除 |
| Info | 文書情報、サポートされるファイルの種類 |
例の実行方法
- 例のリポジトリ をクローンまたはダウンロードします
- Visual Studio 2017 以降で
Examples/GroupDocs.Watermark.Cloud.Examples.sln を開きます - ソリューションを右クリックし、Enable NuGet Package Restore を選択します
Examples/GroupDocs.Watermark.Cloud.Examples.CSharp/RunExamples.cs を編集し、Common.MyAppSid と Common.MyAppKey を設定します- ビルドして実行します
詳細は Getting Started を参照してください。
