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.

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.Watermark-Cloud

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
Um GroupDocs.Watermark 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.Watermark Cloud SDK for .NET zu verwenden.
using GroupDocs.Watermark.Cloud.Sdk.Api;
using GroupDocs.Watermark.Cloud.Sdk.Client;
var configuration = new Configuration("YourClientId", "YourClientSecret");
var apiInstance = new WatermarkApi(configuration);
Das vollständige Beispiel finden Sie in Common.cs.
Textwasserzeichen hinzufügen
Dieses Beispiel fügt einem Word-Dokument ein Textwasserzeichen in Arial hinzu.
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);
Das vollständige Beispiel finden Sie in AddTextWatermarks.cs.
Bildwasserzeichen hinzufügen
Dieses Beispiel fügt einem Word-Dokument ein Bildwasserzeichen hinzu.
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);
Das vollständige Beispiel finden Sie in AddImageWatermarks.cs.
Nach Wasserzeichen suchen
Dieses Beispiel sucht in einem PDF nach einem Textwasserzeichen und einem Bildwasserzeichen.
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}");
}
Das vollständige Beispiel finden Sie in SearchWatermarks.cs.
Wasserzeichen entfernen
Dieses Beispiel entfernt passende Text- und Bildwasserzeichen aus einem 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);
Das vollständige Beispiel finden Sie in RemoveWatermarks.cs.
Beispiele auf GitHub
Das Repository GroupDocs.Watermark Cloud .NET Examples enthält sofort ausführbare Beispiele zu folgenden Themen:
| Category | Examples |
|---|
| Wasserzeichen | Text hinzufügen, Bild hinzufügen, suchen, ersetzen, entfernen |
| Info | Dokumentinformationen, unterstützte Dateitypen |
Beispiele ausführen
- Klonen oder laden Sie das Beispiel-Repository herunter
- Öffnen Sie
Examples/GroupDocs.Watermark.Cloud.Examples.sln in Visual Studio 2017 oder höher - Klicken Sie mit der rechten Maustaste auf die Projektmappe und wählen Sie Enable NuGet Package Restore
- Bearbeiten Sie
Examples/GroupDocs.Watermark.Cloud.Examples.CSharp/RunExamples.cs und legen Sie Common.MyAppSid und Common.MyAppKey fest - Erstellen und ausführen
Weitere Informationen finden Sie unter Getting Started.
