A simple command-line tool to remove watermarks from PDF files using Node.js.
- Clone the repository:
git clone https://github.com/yourusername/pdf-watermark-remover.git
cd pdf-watermark-remover
- Install the dependencies:
npm install
To run the program, use the following command:
npm run clean -- -i [input_pdf] -o [output_pdf] -b [x1,y1,x2,y2]
input_pdf
: The path to the watermarked PDF file.output_pdf
: The path where the cleaned PDF file will be saved.x1,y1,x2,y2
: Comma-separated coordinates defining the area of the watermark. The coordinates should be specified as follows:x1
: Starting x-coordinate of the watermark.y1
: Starting y-coordinate of the watermark.x2
: Ending x-coordinate of the watermark.y2
: Ending y-coordinate of the watermark.
--input
,-i
: Path to the watermarked PDF file.--output
,-o
: Path where the cleaned PDF file will be saved.--box
,-b
: Comma-separated coordinates of the watermark (x1,y1,x2,y2).
To see help information, you can run:
npm run clean -- --help
To remove a watermark from a PDF:
npm run clean -- -i example/input.pdf -o example/output.pdf -b 0,812,550,550
NOTE
Pdf coordinate system (0,0) is positioned at bottom-left corner of the page. Y axis increases upwards and X axis increases rightwards.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
- Fork the repository.
- Create your feature branch:
git checkout -b feature/MyFeature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/MyFeature
- Open a pull request.
This project is licensed under the MIT License.