watermark-remover
v1.6.0
Published
Remove watermarks from a pdf
Downloads
103
Readme
Watermark Remover
Remove a watermark from a pdf
Introduction
This only works for text based watermarks that have been added to the pdf as text. It will not work for images or other types of watermarks.
Getting Started
You must have qpdf >v11 and exiftool (to remove metadata) installed. You can install it with brew on macos:
brew install qpdf exiftoolor with apt
sudo apt-get install qpdf exiftoolThen add this as a dependency
yarn add watermark-removeror you can just run the binary with
npx watermark-remover -f file.pdf -w <WATERMARK TEXT>Usage
import { removeWatermark } from "watermark-remover";
(async () => {
const filePath = "my-file.pdf";
const outputPath = "my-file-without-watermark.pdf";
await removeWatermark(filePath, { watermark: "Confidential", outputFile: outputPath });
})();