PDF Watermark Maker Using HTML, CSS and JavaScript with Source Code

Language

Welcome to the PDF Watermark Maker! This lightweight web application lets you quickly and securely add customizable text watermarks to your PDF documents. Built with HTML, CSS, and JavaScript, our tool runs entirely in your browser — meaning your files never leave your device, ensuring complete privacy. Whether you need to mark documents as "Confidential," add draft notices, or include branding, our intuitive interface makes watermarking effortless with just a few clicks.

Key features include flexible text customization, multiple positioning options, adjustable opacity, and font selection — all designed to give you precise control over your watermarks. You can apply watermarks to specific pages or an entire document, with support for tiled patterns or single placements. The drag-and-drop functionality and clean, modern design make the process smooth and efficient. Best of all, there's no software to install and no files uploaded to external servers, keeping your documents private and secure while you work.

You may also check this simple HTML, CSS and JavaScript project:

✨ Features:

  • Customizable Watermark Text
    Add any text as a watermark (e.g., "DRAFT," "CONFIDENTIAL").

  • Multiple Positioning Options
    Place watermarks in different positions:

    • Center

    • Tiled (Repeated Pattern)

    • Corners (Top-Left, Top-Right, Bottom-Left, Bottom-Right)

  • Adjustable Appearance
    Control:

    • Font Size (10px–72px)

    • Text Color (color picker)

    • Opacity (10%–100%)

    • Rotation (0°, 45°, 90°)

  • Font Selection
    Choose from standard PDF fonts (Helvetica, Times New Roman, Courier, Arial).

  • Page Range Support
    Apply watermarks to all pages or specify a custom range (e.g., "1-3,5,7-9").

  • Drag & Drop Upload
    Easily upload PDF files by dragging and dropping or browsing.

  • Download Ready
    Instantly download the watermarked PDF with a single click.

🛠 Technologies Used:

  • HTML5 & CSS3 – For structure and styling.

  • JavaScript (ES6+) – For dynamic functionality.

  • PDF-Lib – A powerful PDF manipulation library.

  • FileSaver.js – For saving files directly in the browser.

  • Font Awesome – For icons.

  • Google Fonts (Inter) – For clean typography.

📌 How to Use:

  1. Upload a PDF
    Drag & drop or click to select a PDF file.

  2. Customize Watermark
    Adjust text, color, opacity, size, rotation, and position.

  3. Select Pages
    Choose whether to apply the watermark to all pages or a specific range.

  4. Generate & Download
    Click "Generate Watermarked PDF" to process and download your file.

Sample Screenshots of the Project

Landing Page

Put Watermark PDF with Watermark How to Run?

  • Download the provided source code zip file.
  • Extract the downloaded zip file.
  • Open the html file and you are now ready to go!

Video Demonstration for Installation/Setup:

Conclusion:

In conclusion, the PDF Watermark Maker provides a simple yet powerful solution for adding professional watermarks to your documents, combining ease of use with robust customization options — all while keeping your files private and secure through client-side processing. Whether you're marking confidential reports, branding documents, or protecting intellectual property, this tool offers a fast, efficient, and privacy-focused way to enhance your PDFs without any complicated software or data transfers.

That's it! I hope this "PDF Watermark Maker Using HTML, CSS and JavaScript" will assist you on your  programming journey, providing value to your current and upcoming projects.

For additional tutorials and free source codes, explore our website.

Enjoy Coding :>>

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.