Removing an image watermark from a PDF can be crucial when you need to clean your documents for redistribution or archiving. Using .NET REST API, you can easily remove image watermarks from PDFs online without any desktop software. This tutorial provides a detailed guide on how to delete image watermarks from PDF documents programmatically in C#.



Why to Remove Watermark from PDF?

Given below are some of the reasons highlighting the reasons to remove image watermarks from PDF:

  • Clean up shared documents – Remove outdated branding or proof marks.
  • Prepare content for reuse – Reuse or republish PDFs without logos.
  • Improve document aesthetics – Get rid of unwanted or intrusive image watermarks.
  • Automate watermark removal – Save time by batch-processing files using REST API.

Watermark Processing API

The GroupDocs.Watermark Cloud SDK for .NET is an amazing REST based SDK offering the capabilities to add as well as manipulate existing watermarks from PDF document.

Key Features

  • Remove image or text watermarks from PDF, Word, Excel, or PowerPoint Presentation.
  • Works online without need of Adobe Acrobat.
  • Preserve document layout and quality after removal.
  • Process specific pages or entire documents.

Installation

Install the SDK via NuGet:

PM> NuGet\Install-Package GroupDocs.Watermark-Cloud -Version 23.8.0

Remove PDF Watermark in C#

Here’s how you can remove image watermark from PDF files using C# .NET.

Step 1 – Initialize API Configuration

var configuration = new Configuration("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");
var watermarkApi = new WatermarkApi(configuration);

Step 2 – Define PDF File Info

var fileInfo = new FileInfo
{
    FilePath = "watermarked.pdf",
    StorageName = "internal"
};

Step 3 – Configure Removal criteria

ImageSearchCriteria = new ImageSearchCriteria
{
    ImageFileInfo = new FileInfo 
    { 
      FilePath = "watermark_images/confidential.png" 
    }
},

Step 4 – Execute the Removal Request

var request = new RemoveWatermarkRequest(options);
var response = watermarkApi.RemoveWatermark(request);

Delete PDF Watermark using cURL

Alternatively, you may consider using GroupDocs.Watermark Cloud with cURL commands to remove watermarks directly from PDF file.

Step 1 – Obtain Access Token

curl -v -X POST "https://api.groupdocs.cloud/connect/token" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET" -H "Content-Type: application/x-www-form-urlencoded"

Step 2 – Remove Image Watermark from PDF

curl -v -X POST "https://api.groupdocs.cloud/v1.0/watermark/pdf/remove" \  
-H "accept: application/json" \  
-H "authorization: Bearer {ACCESS_TOKEN}" \  
-H "Content-Type: application/json" -d '{ 
  "FileInfo": { "FilePath": "watermarked.pdf", "StorageName": "internal" },
  "OutputFolder": "output",
  "PdfOptions": { "RemoveImages": true }
}'

Replace {ACCESS_TOKEN} with the token obtained from the previous step.


Conclusion

In this article, we have learned that GroupDocs.Watermark Cloud SDK for .NET provides a reliable and cloud-based solution to remove image watermarks from PDF documents. Whether you’re looking to clean up old branding or simply need to develop an online watermark removal tool, this API makes it quick, secure, and efficient.


Frequently Asked Questions – FAQs

1. Can I remove both image and text watermarks from PDF?
Yes. You can remove both text and image watermarks using the same API.

2. Will my PDF quality be affected after watermark removal?
No. The SDK maintains the original quality and layout.

3. Do I need Adobe Acrobat or any external tool?
No. The GroupDocs Cloud API works fully online and requires no desktop software.

4. Can I remove watermarks from specific pages only?
Yes. You can specify page numbers to target watermark removal selectively.

5. Is there a free version available?
Yes. You can test the watermark remover by creating a free trial account.