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.

Instalación
El paquete está disponible en nuget.org y se puede instalar desde la consola del Administrador de paquetes con el siguiente comando:
NuGet\Install-Package GroupDocs.Watermark-Cloud

Requisitos
- .NET Framework 2.0 o .NET Standard 2.0
- NuGet
- System.Web al dirigirse a .NET Framework 2.0
- Credenciales de GroupDocs Cloud — Client ID and Client Secret del panel
Inicio rápido
Obtener las credenciales de API
Para usar GroupDocs.Watermark Cloud, regístrese en el panel de GroupDocs.Cloud y obtenga el Client ID y el Client Secret.
Inicializar la API
Use el código siguiente para empezar a usar 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);
Vea el ejemplo completo en Common.cs.
Agregar una marca de agua de texto
Este ejemplo agrega una marca de agua de texto Arial a un documento de 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
{
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);
Vea el ejemplo completo en AddTextWatermarks.cs.
Agregar una marca de agua de imagen
Este ejemplo agrega una marca de agua de imagen a un documento de 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);
Vea el ejemplo completo en AddImageWatermarks.cs.
Buscar marcas de agua
Este ejemplo busca en un PDF una marca de agua de texto y una marca de agua de imagen.
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}");
}
Vea el ejemplo completo en SearchWatermarks.cs.
Quitar marcas de agua
Este ejemplo quita las marcas de agua de texto e imagen coincidentes de un 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);
Vea el ejemplo completo en RemoveWatermarks.cs.
Ejemplos en GitHub
El repositorio GroupDocs.Watermark Cloud .NET Examples incluye ejemplos listos para ejecutar sobre:
| Category | Examples |
|---|
| Marcas de agua | Agregar texto, agregar imagen, buscar, reemplazar, quitar |
| Info | Información del documento, tipos de archivo admitidos |
Cómo ejecutar los ejemplos
- Clone o descargue el repositorio de ejemplos
- Abra
Examples/GroupDocs.Watermark.Cloud.Examples.sln en Visual Studio 2017 o posterior - Haga clic con el botón derecho en la solución y seleccione Enable NuGet Package Restore
- Edite
Examples/GroupDocs.Watermark.Cloud.Examples.CSharp/RunExamples.cs y establezca Common.MyAppSid y Common.MyAppKey - Compile y ejecute
Para obtener más detalles, visite Getting Started.
