<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>watermark removal on Document Processing REST APIs | GroupDocs Cloud</title>
    <link>https://blog-qa.groupdocs.cloud/tag/watermark-removal/</link>
    <description>Recent content in watermark removal on Document Processing REST APIs | GroupDocs Cloud</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 07 Sep 2026 13:44:25 +0000</lastBuildDate><atom:link href="https://blog-qa.groupdocs.cloud/tag/watermark-removal/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Remove Image Watermark from PDF in Java</title>
      <link>https://blog-qa.groupdocs.cloud/watermark/remove-image-watermark-from-pdf-in-java/</link>
      <pubDate>Mon, 07 Sep 2026 13:44:25 +0000</pubDate>
      
      <guid>https://blog-qa.groupdocs.cloud/watermark/remove-image-watermark-from-pdf-in-java/</guid>
      <description>Remove an image watermark from a PDF with GroupDocs.Watermark Cloud SDK for Java. Follow a step-by-step guide with complete code and cURL examples.</description>
      <content:encoded><![CDATA[<p>Unwanted image watermarks can make <a href="https://docs.fileformat.com/pdf">PDF</a> documents look unprofessional and hinder downstream processing. <a href="https://products.groupdocs.cloud/watermark/java/">GroupDocs.Watermark Cloud SDK for Java</a> offers a robust API that lets Java developers programmatically strip those watermarks from PDF files. This guide shows how to <strong>remove image watermark from PDF in Java</strong> using the SDK&rsquo;s removal endpoint. By the end, you&rsquo;ll be able to integrate automatic watermark removal into any Java application.</p>
<h2 id="java-development-environment---prerequisites-and-setup">Java Development Environment - Prerequisites and Setup</h2>
<p>Before you start, make sure you have the following:</p>
<ul>
<li>Java 17 or higher installed.</li>
<li>Maven or Gradle for dependency management.</li>
<li>A GroupDocs Cloud account with <strong>client ID</strong> and <strong>client secret</strong>.</li>
</ul>
<p>Add the SDK to your project with the Maven dependency below (you can also use the Gradle equivalent). The latest binaries are available on the <a href="https://releases.groupdocs.cloud/watermark/java/">download page</a>.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-xml" data-lang="xml"><span style="display:flex;"><span><span style="color:#f92672">&lt;dependency&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;groupId&gt;</span>com.groupdocs<span style="color:#f92672">&lt;/groupId&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;artifactId&gt;</span>groupdocs-watermark-cloud<span style="color:#f92672">&lt;/artifactId&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;version&gt;</span>23.8<span style="color:#f92672">&lt;/version&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">&lt;/dependency&gt;</span>
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
<p>Initialize the API client using your credentials. This snippet is taken directly from the sample code.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>ApiClient apiClient <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> ApiClient<span style="color:#f92672">(</span><span style="color:#e6db74">&#34;YOUR_CLIENT_ID&#34;</span><span style="color:#f92672">,</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_SECRET&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>WatermarkApi watermarkApi <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> WatermarkApi<span style="color:#f92672">(</span>apiClient<span style="color:#f92672">);</span>
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
<p>With the client ready, you can move on to the actual removal workflow.</p>
<h2 id="step-by-step-guide-to-remove-image-watermark-from-pdf-in-java">Step-by-Step Guide to Remove Image Watermark from PDF in Java</h2>
<h3 id="step-1-load-the-source-document">Step 1: Load the Source Document</h3>
<p>First, specify the PDF you want to clean. The <code>FileInfo</code> object tells the API where the file lives and optionally supplies a password.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>FileInfo inputFile <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> FileInfo<span style="color:#f92672">();</span>
</span></span><span style="display:flex;"><span>inputFile<span style="color:#f92672">.</span><span style="color:#a6e22e">setFilePath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;input.pdf&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// inputFile.setPassword(&#34;pdfPassword&#34;); // Uncomment if needed
</span></span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
<h3 id="step-2-define-the-image-watermark-criteria">Step 2: Define the Image Watermark Criteria</h3>
<p>Create an <code>ImageSearchCriteria</code> that points to the watermark image you wish to delete. This is the core of the <strong>remove image watermark from PDF in Java</strong> operation.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>ImageSearchCriteria imageCriteria <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> ImageSearchCriteria<span style="color:#f92672">();</span>
</span></span><span style="display:flex;"><span>imageCriteria<span style="color:#f92672">.</span><span style="color:#a6e22e">setImagePath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;watermark.png&#34;</span><span style="color:#f92672">);</span>
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
<h3 id="step-3-set-up-removal-options">Step 3: Set Up Removal Options</h3>
<p>Combine the file information and search criteria into a <code>RemoveOptions</code> object. You also define where the cleaned PDF will be saved.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>RemoveOptions removeOptions <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> RemoveOptions<span style="color:#f92672">();</span>
</span></span><span style="display:flex;"><span>removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setFileInfo</span><span style="color:#f92672">(</span>inputFile<span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setOutputPath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;output.pdf&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setSearchCriteria</span><span style="color:#f92672">(</span>Collections<span style="color:#f92672">.</span><span style="color:#a6e22e">singletonList</span><span style="color:#f92672">(</span>imageCriteria<span style="color:#f92672">));</span>
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
<h3 id="step-4-execute-the-removal-call">Step 4: Execute the Removal Call</h3>
<p>Invoke the <code>remove</code> method on the <code>WatermarkApi</code>. The call returns a <code>RemoveResult</code> that contains the path to the processed file.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>RemoveResult result <span style="color:#f92672">=</span> watermarkApi<span style="color:#f92672">.</span><span style="color:#a6e22e">remove</span><span style="color:#f92672">(</span>removeOptions<span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>System<span style="color:#f92672">.</span><span style="color:#a6e22e">out</span><span style="color:#f92672">.</span><span style="color:#a6e22e">println</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;Watermark removal completed. Output file: &#34;</span> <span style="color:#f92672">+</span> result<span style="color:#f92672">.</span><span style="color:#a6e22e">getPath</span><span style="color:#f92672">());</span>
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
<h3 id="step-5-process-the-result">Step 5: Process the Result</h3>
<p>Handle any exceptions that may arise. The SDK throws <code>ApiException</code> for service‑side errors and generic <code>Exception</code> for unexpected issues.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span><span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e">// removal code above
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>ApiException e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>    System<span style="color:#f92672">.</span><span style="color:#a6e22e">err</span><span style="color:#f92672">.</span><span style="color:#a6e22e">println</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;API exception occurred: &#34;</span> <span style="color:#f92672">+</span> e<span style="color:#f92672">.</span><span style="color:#a6e22e">getMessage</span><span style="color:#f92672">());</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>Exception e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>    System<span style="color:#f92672">.</span><span style="color:#a6e22e">err</span><span style="color:#f92672">.</span><span style="color:#a6e22e">println</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;Unexpected error: &#34;</span> <span style="color:#f92672">+</span> e<span style="color:#f92672">.</span><span style="color:#a6e22e">getMessage</span><span style="color:#f92672">());</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
<h2 id="complete-code-example-remove-image-watermark-using-groupdocs">Complete Code Example: Remove Image Watermark Using GroupDocs</h2>
<p>The following example demonstrates the full workflow from client initialization to result handling.</p>
<!--[COMPLETE_CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span><span style="color:#f92672">import</span> com.groupdocs.watermark.cloud.api.WatermarkApi<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> com.groupdocs.watermark.cloud.client.ApiClient<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> com.groupdocs.watermark.cloud.client.ApiException<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> com.groupdocs.watermark.cloud.model.FileInfo<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> com.groupdocs.watermark.cloud.model.ImageSearchCriteria<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> com.groupdocs.watermark.cloud.model.RemoveOptions<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> com.groupdocs.watermark.cloud.model.RemoveResult<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> java.util.Collections<span style="color:#f92672">;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">public</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">RemoveImageWatermarkFromPdf</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">main</span><span style="color:#f92672">(</span>String<span style="color:#f92672">[]</span> args<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#75715e">// Initialize API client with your credentials
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>        ApiClient apiClient <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> ApiClient<span style="color:#f92672">(</span><span style="color:#e6db74">&#34;YOUR_CLIENT_ID&#34;</span><span style="color:#f92672">,</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_SECRET&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>        WatermarkApi watermarkApi <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> WatermarkApi<span style="color:#f92672">(</span>apiClient<span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#75715e">// Prepare input file information
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>        FileInfo inputFile <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> FileInfo<span style="color:#f92672">();</span>
</span></span><span style="display:flex;"><span>        inputFile<span style="color:#f92672">.</span><span style="color:#a6e22e">setFilePath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;input.pdf&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>        <span style="color:#75715e">// If the PDF is password protected, uncomment the following line and set the password
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>        <span style="color:#75715e">// inputFile.setPassword(&#34;pdfPassword&#34;);
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
</span></span><span style="display:flex;"><span>        <span style="color:#75715e">// Define the image watermark to be removed
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>        ImageSearchCriteria imageCriteria <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> ImageSearchCriteria<span style="color:#f92672">();</span>
</span></span><span style="display:flex;"><span>        imageCriteria<span style="color:#f92672">.</span><span style="color:#a6e22e">setImagePath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;watermark.png&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#75715e">// Set up removal options
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>        RemoveOptions removeOptions <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> RemoveOptions<span style="color:#f92672">();</span>
</span></span><span style="display:flex;"><span>        removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setFileInfo</span><span style="color:#f92672">(</span>inputFile<span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>        removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setOutputPath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;output.pdf&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>        removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setSearchCriteria</span><span style="color:#f92672">(</span>Collections<span style="color:#f92672">.</span><span style="color:#a6e22e">singletonList</span><span style="color:#f92672">(</span>imageCriteria<span style="color:#f92672">));</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#75715e">// Execute removal
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>            RemoveResult result <span style="color:#f92672">=</span> watermarkApi<span style="color:#f92672">.</span><span style="color:#a6e22e">remove</span><span style="color:#f92672">(</span>removeOptions<span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>            System<span style="color:#f92672">.</span><span style="color:#a6e22e">out</span><span style="color:#f92672">.</span><span style="color:#a6e22e">println</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;Watermark removal completed. Output file: &#34;</span> <span style="color:#f92672">+</span> result<span style="color:#f92672">.</span><span style="color:#a6e22e">getPath</span><span style="color:#f92672">());</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>ApiException e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>            System<span style="color:#f92672">.</span><span style="color:#a6e22e">err</span><span style="color:#f92672">.</span><span style="color:#a6e22e">println</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;API exception occurred: &#34;</span> <span style="color:#f92672">+</span> e<span style="color:#f92672">.</span><span style="color:#a6e22e">getMessage</span><span style="color:#f92672">());</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>Exception e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>            System<span style="color:#f92672">.</span><span style="color:#a6e22e">err</span><span style="color:#f92672">.</span><span style="color:#a6e22e">println</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;Unexpected error: &#34;</span> <span style="color:#f92672">+</span> e<span style="color:#f92672">.</span><span style="color:#a6e22e">getMessage</span><span style="color:#f92672">());</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">}</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
</span></span></code></pre></div><!--[COMPLETE_CODE_SNIPPET_END]-->
<blockquote>
<p><strong>Note:</strong> This code example demonstrates the core functionality. Before using it in your project, make sure to update any file paths and configuration values to match your actual environment, verify that all required dependencies are properly installed, and test thoroughly in your development environment. If you encounter any issues, please refer to the <a href="https://docs.groupdocs.cloud/watermark/">official documentation</a> or reach out to the <a href="https://forum.groupdocs.cloud/c/watermark/29">support team</a> for assistance.</p>
</blockquote>
<h2 id="watermark-removal-operation-via-rest-api-using-curl">Watermark Removal Operation via REST API using cURL</h2>
<p>If you prefer a pure REST approach, the same operation can be performed with cURL commands.</p>
<ol>
<li>
<p><strong>Authenticate and obtain an access token</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/auth/token&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/json&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -d <span style="color:#e6db74">&#39;{&#34;client_id&#34;:&#34;YOUR_CLIENT_ID&#34;,&#34;client_secret&#34;:&#34;YOUR_CLIENT_SECRET&#34;}&#39;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Upload the source PDF</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/storage/upload?path=input.pdf&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -F <span style="color:#e6db74">&#34;file=@/local/path/input.pdf&#34;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Execute the watermark removal</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/watermark/remove&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/json&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -d <span style="color:#e6db74">&#39;{
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;fileInfo&#34;: {&#34;filePath&#34;:&#34;input.pdf&#34;},
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;outputPath&#34;:&#34;output.pdf&#34;,
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;searchCriteria&#34;:[{&#34;type&#34;:&#34;Image&#34;,&#34;imagePath&#34;:&#34;watermark.png&#34;}]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">         }&#39;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Download the cleaned PDF</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X GET <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/storage/download?path=output.pdf&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -o output.pdf
</span></span></code></pre></div></li>
</ol>
<p>For a full reference, see the <a href="https://reference.groupdocs.cloud/watermark/">API documentation</a>.</p>
<h2 id="fine-tuning-removal-options">Fine-Tuning Removal Options</h2>
<p>The SDK provides several properties you can adjust to suit different scenarios.</p>
<ul>
<li>
<p><strong>Password Protection</strong> - If the source PDF is encrypted, set the password on <code>FileInfo</code>.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>inputFile<span style="color:#f92672">.</span><span style="color:#a6e22e">setPassword</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;mySecret&#34;</span><span style="color:#f92672">);</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Multiple Search Criteria</strong> - Remove several watermarks in one call by adding more <code>ImageSearchCriteria</code> objects to the list.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>ImageSearchCriteria logoCriteria <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> ImageSearchCriteria<span style="color:#f92672">();</span>
</span></span><span style="display:flex;"><span>logoCriteria<span style="color:#f92672">.</span><span style="color:#a6e22e">setImagePath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;logo.png&#34;</span><span style="color:#f92672">);</span>
</span></span><span style="display:flex;"><span>removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setSearchCriteria</span><span style="color:#f92672">(</span>Arrays<span style="color:#f92672">.</span><span style="color:#a6e22e">asList</span><span style="color:#f92672">(</span>imageCriteria<span style="color:#f92672">,</span> logoCriteria<span style="color:#f92672">));</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Output Format</strong> - Although the default is PDF, you can change the output format by setting <code>outputPath</code> with a different extension (e.g., <code>output.docx</code>).</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span>removeOptions<span style="color:#f92672">.</span><span style="color:#a6e22e">setOutputPath</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;output.docx&#34;</span><span style="color:#f92672">);</span>
</span></span></code></pre></div></li>
</ul>
<p>These options let you tailor the <strong>remove image watermark from PDF in Java</strong> process to your exact needs.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Programmatically removing an image watermark from PDF files is straightforward with the <a href="https://products.groupdocs.cloud/watermark/java/">GroupDocs.Watermark Cloud SDK for Java</a>. By following the steps above, you can integrate watermark deletion into any Java backend, handle encrypted PDFs, and fine‑tune the operation with flexible options. Remember to obtain a proper license for production use; pricing details are available on the product page, and a temporary license can be requested via the <a href="https://purchase.groupdocs.cloud/temporary-license/">temporary license page</a>. Start cleaning your PDFs today and deliver polished documents to your users.</p>
<h2 id="faqs">FAQs</h2>
<ul>
<li>
<p><strong>How do I remove image watermark from PDF in Java?</strong><br>
Use the <code>remove</code> method of <code>WatermarkApi</code> with an <code>ImageSearchCriteria</code> that points to the watermark image. The full code example in this article shows the exact steps.</p>
</li>
<li>
<p><strong>What if my PDF is password protected?</strong><br>
Set the password on the <code>FileInfo</code> object (<code>inputFile.setPassword(&quot;yourPassword&quot;)</code>) before calling the removal API. The SDK will decrypt, process, and re‑encrypt the file automatically.</p>
</li>
<li>
<p><strong>Can I remove watermarks from other formats, such as <a href="https://docs.fileformat.com/word-processing/docx/">DOCX</a>?</strong><br>
Yes. The same API works with any format supported by GroupDocs.Watermark. Just change the <code>filePath</code> and <code>outputPath</code> extensions accordingly.</p>
</li>
<li>
<p><strong>Are there limits on the size of the PDF I can process?</strong><br>
The cloud service handles files up to 500 MB per request. For larger documents, consider splitting the PDF into smaller parts before processing.</p>
</li>
</ul>
<h2 id="read-more">Read More</h2>
<ul>
<li><a href="https://blog.groupdocs.cloud/watermark/add-image-watermark-to-pdf-documents-in-java/">Add Image Watermark to PDF Documents in Java</a></li>
<li><a href="https://blog.groupdocs.cloud/watermark/add-watermark-to-images-using-java/">Add Watermark to Images using Java</a></li>
<li><a href="https://blog.groupdocs.cloud/watermark/remove-image-watermark-from-pdf-in-csharp/">Remove Image Watermark from PDF in C# | Delete PDF Watermark</a></li>
</ul>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
