# Remove hidden AI watermarks: web app, CLI

## What it does
Unwatermark deletes invisible AI‑generated watermarks from text‑based documents. It removes zero‑width characters, Unicode tags, unusual spaces and homoglyphs, and can optionally replace typographic punctuation with plain ASCII. A report lists the characters that were removed.

## Inputs and limits
* Supported formats: PDF, plain‑text (`*.txt`), Markdown (`*.md`).  
* The CLI reads files from a per‑task input folder and writes a cleaned file (same name, with `.txt` for PDFs) and a `<name>_report.txt` to the output folder.  
* Requires the .NET 10 runtime; a `documentize.lic` file placed next to the DLL enables full evaluation mode.  
* No explicit size limits are documented; processing is limited by the host’s memory and disk space.

## Web app
The Unwatermark web page (`/ai-prod/unwatermark`) lets the user upload a PDF, DOCX, ODT, TXT or Markdown file. After upload the service scans the document for invisible watermarks, cleans the text, rewrites any watermarked sections, and removes all metadata. The cleaned document and a report are then available for download.

## Command line (CLI)
The CLI plugin removes hidden watermarks from files in a task folder. Use `--normalize-punctuation` to also replace typographic quotes, dashes and ellipses with plain ASCII. Run the plugin with a task identifier; the input folder must contain the file to process and the output folder receives the cleaned file and a report.  
```bash
# Linux / macOS (needs the .NET 10 runtime and documentize.lic next to the DLL)
export PLUGIN_INPUT_DIR=./work/input
export PLUGIN_OUTPUT_DIR=./work/output
mkdir -p "$PLUGIN_INPUT_DIR/job1"
cp sample.pdf "$PLUGIN_INPUT_DIR/job1/"
dotnet Documentize.Unwatermark.dll --task-id job1
ls "$PLUGIN_OUTPUT_DIR/job1"
```

```powershell
# Windows PowerShell
$env:PLUGIN_INPUT_DIR  = "$PWD\work\input"
$env:PLUGIN_OUTPUT_DIR = "$PWD\work\output"
New-Item -ItemType Directory -Force "$env:PLUGIN_INPUT_DIR\job1" | Out-Null
Copy-Item sample.pdf "$env:PLUGIN_INPUT_DIR\job1\"
dotnet Documentize.Unwatermark.dll --task-id job1
Get-ChildItem "$env:PLUGIN_OUTPUT_DIR\job1"
```

## Verified

Every code sample on this page was run on 2026-11-03 and its result was checked:

- Unwatermark CLI sample with report check (CLI plugin): passed in 4 s
