Skip to content

hpc20235/pdf-watermark-remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Watermark Remover

A simple command-line tool to remove watermarks from PDF files using Node.js.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/pdf-watermark-remover.git
cd pdf-watermark-remover
  1. Install the dependencies:
npm install

Usage

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.

Options

  • --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).

Examples

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.

coordinates

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

  1. Fork the repository.
  2. Create your feature branch: git checkout -b feature/MyFeature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/MyFeature
  5. Open a pull request.

License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published