Skip to content

Feature: Add support for Image/Logo Watermarks #75

@Anubhav-Mondal

Description

@Anubhav-Mondal

Description

Currently, the tool only supports adding text-based watermarks to PDF files. This issue proposes adding a feature that allows users to upload an image (PNG or JPEG) to be used as a watermark. This is essential for branding and corporate document security.

Implementation Hints

  1. Use pdfDoc.embedPng or pdfDoc.embedJpg to load the image bytes.

  2. Utilize page.drawImage() with the opacity and transformation parameters.

  3. Calculate the aspect ratio to prevent image stretching during scaling.

Suggested Labels

NSoC'26, enhancement

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions