https://github.com/jonluca/watermark-remover
Remove watermarks from pdfs
https://github.com/jonluca/watermark-remover
Last synced: 8 months ago
JSON representation
Remove watermarks from pdfs
- Host: GitHub
- URL: https://github.com/jonluca/watermark-remover
- Owner: jonluca
- Created: 2023-06-15T20:49:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-07T21:05:36.000Z (over 2 years ago)
- Last Synced: 2025-01-20T16:55:41.063Z (over 1 year ago)
- Language: TypeScript
- Size: 442 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Watermark Remover
[](https://www.npmjs.com/package/watermark-remover) [](https://www.npmjs.com/package/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 exiftool
```
or with apt
```bash
sudo apt-get install qpdf exiftool
```
Then add this as a dependency
```
yarn add watermark-remover
```
or you can just run the binary with
```
npx watermark-remover -f file.pdf -w
```
# Usage
```typescript
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 });
})();
```