GroupDocs.Watermark for .NET Solution

Edit Watermarks in Pdf: .NET Adaptability

Adapt to your document needs seamlessly with GroupDocs.Watermark for .NET Framework. Edit watermarks across multiple formats with ease.

Programmatically Edit Watermarks in Pdf Documents with the .NET API

GroupDocs.Watermark for .NET furnishes .NET developers with a robust API for programmatically manipulating watermarks within diverse Pdf documents. This guide outlines the process:

  1. Initiate the workflow by supplying your Pdf file as an argument to the Watermarker class constructor. The file can be provided as either a byte stream, a file stream, or a reference to a local disk location.
  2. Subsequently, leverage the SearchCriteria object to pinpoint the specific watermarks requiring modification. This object enables the identification of watermarks previously embedded within the document.
  3. Upon successful execution of the search, you’ll receive a collection of relevant watermarks. These watermarks offer granular control, allowing you to modify properties such as dimensions, page positioning, text content, color scheme, image data, and more.
  4. Following the completion of watermark edits, persist the modified document. The API facilitates storage using either a local file path or a stream object.
// Edit image watermark in PDF doc

// Initialize Watermarker by source file
using (Watermarker watermarker = new Watermarker("input.pdf"))
{
    // Create SearchCriteria for image watermarks search
    SearchCriteria searchCriteria = new ImageDctHashSearchCriteria("logo.png");
    PossibleWatermarkCollection watermarks = watermarker.Search(searchCriteria);

    foreach (PossibleWatermark watermark in watermarks)
    {
        // Edit image watermark
        watermark.ImageData = imageData;
    }

    // Save result PDF
    watermarker.Save("output.pdf");
}
dotnet add package GroupDocs.Watermark
click to copy
copied
More examples Documentation

Supercharge Your Workflows with Watermark Management

Simplify watermarking across diverse file formats in your .NET applications with our robust library. Effortlessly add, edit, search for, or remove watermarks to enhance document security and branding.

Seamless Watermark Editing

Streamline Watermarking in Your Applications

Leverage the power of GroupDocs.Watermark for .NET to seamlessly integrate watermarking functionality into your .NET applications. Our intuitive API simplifies watermark creation, management, search, and editing, eliminating the need for complex manual processes.

Granular Watermark Customization

Unleash the full potential of watermark customization with our comprehensive API. Fine-tune every detail, including size, orientation, color scheme, and font selection, to create watermarks that perfectly align with your branding and security requirements.

Harness Document-Specific Features for Flexible Watermarking

Unlock the power of native functionalities within various document formats. Utilize elements like document background, annotations, headers, or other objects as unique watermark containers, catering to diverse document types and security needs.

PDF image watermark edit

This example shows how to edit content of image watermark

C#


    //  Load document as PDF
    var loadOptions = new PdfLoadOptions();
    using (Watermarker watermarker = new Watermarker("source.pdf", loadOptions))
    {
        //  Load content
        PdfContent pdfContent = watermarker.GetContent<PdfContent>();

        //  Edit image watermark
        foreach (PdfArtifact artifact in pdfContent.Pages[0].Artifacts)
        {
            if (artifact.Image != null)
            {
                artifact.Image = new PdfWatermarkableImage(File.ReadAllBytes("test.png"));
            }
        }

        //  Enjoy output result
        watermarker.save("result.pdf");
    }

GroupDocs.Watermark for .NET Solution

Edit Watermark in PDFs: Protect your content across multiple formats with GroupDocs.Watermark for .NET Framework. Adapt to your document needs seamlessly with our versatile tools.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Watermark for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Adjust Watermarks in Multiple Formats

Protect your content across various document formats with GroupDocs.Watermark for .NET Framework.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English