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.

Instalação
O pacote está disponível em nuget.org e pode ser instalado pelo Console do Gerenciador de Pacotes com o seguinte comando:
NuGet\Install-Package GroupDocs.Watermark-Cloud

Requisitos
- .NET Framework 2.0 ou .NET Standard 2.0
- NuGet
- System.Web ao direcionar para o .NET Framework 2.0
- Credenciais do GroupDocs Cloud — Client ID and Client Secret do painel
Início rápido
Obter as credenciais de API
Para usar o GroupDocs.Watermark Cloud, inscreva-se no painel do GroupDocs.Cloud e obtenha o Client ID e o Client Secret.
Inicializar a API
Use o código a seguir para começar a usar o 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);
Veja o exemplo completo em Common.cs.
Adicionar uma marca d’água de texto
Este exemplo adiciona uma marca d’água de texto Arial a um documento do 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);
Veja o exemplo completo em AddTextWatermarks.cs.
Adicionar uma marca d’água de imagem
Este exemplo adiciona uma marca d’água de imagem a um documento do 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);
Veja o exemplo completo em AddImageWatermarks.cs.
Pesquisar marcas d’água
Este exemplo pesquisa uma marca d’água de texto e uma marca d’água de imagem em um 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}");
}
Veja o exemplo completo em SearchWatermarks.cs.
Remover marcas d’água
Este exemplo remove as marcas d’água de texto e de imagem correspondentes de um 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);
Veja o exemplo completo em RemoveWatermarks.cs.
Exemplos no GitHub
O repositório GroupDocs.Watermark Cloud .NET Examples inclui exemplos prontos para executar sobre:
| Category | Examples |
|---|
| Marcas d’água | Adicionar texto, adicionar imagem, pesquisar, substituir, remover |
| Info | Informações do documento, tipos de arquivo compatíveis |
Como executar os exemplos
- Clone ou baixe o repositório de exemplos
- Abra
Examples/GroupDocs.Watermark.Cloud.Examples.sln no Visual Studio 2017 ou posterior - Clique com o botão direito do mouse na solução e selecione Enable NuGet Package Restore
- Edite
Examples/GroupDocs.Watermark.Cloud.Examples.CSharp/RunExamples.cs e defina Common.MyAppSid e Common.MyAppKey - Compile e execute
Para mais detalhes, visite Getting Started.
