GroupDocs.Watermark for .NET 23.12 Release Notes
This page contains release notes for GroupDocs.Watermark for .NET 23.12
Full list of changes in this release
Key | Category | Summary |
---|---|---|
WATERMARKNET‑1507 | Feature | Develop a feature that provides detailed adding watermarks process information |
WatermarkResult feature that provides detailed adding watermarks process informations
The feature that provides a structured and comprehensive summary of the outcomes of a watermarking operation on a document. This feature encapsulates various essential metrics and details about the watermarking process, facilitating a more thorough understanding of the transformation applied to the document.
PdfLoadOptions loadOptions = new PdfLoadOptions();
// Initialize Watermarker with the input PDF and load options
using (Watermarker watermarker = new Watermarker("test.pdf", loadOptions))
{
// Create a text watermark with a specified text and font
TextWatermark textWatermark = new TextWatermark("This is a test watermark", new Font("Arial", 48));
// Set up watermarking options to apply the watermark to all pages
textWatermark.PagesSetup = new PagesSetup { AllPages = true };
// Add the text watermark with additional options
PdfArtifactWatermarkOptions textWatermarkOptions = new PdfArtifactWatermarkOptions();
watermarker.Add(textWatermark, textWatermarkOptions);
// Save the watermarked document and capture the watermarking result
WatermarkResult watermarkResult = watermarker.Save("result.pdf");
// Retrieve watermarking metrics from the result
TimeSpan processingTime = watermarkResult.ProcessingTime;
long sourceDocumentSize = watermarkResult.SourceDocumentSize;
long finalDocumentSize = watermarkResult.FinalDocumentSize;
int watermarksApplied = watermarkResult.NumberWatermarksApplied;
}