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
-
Use pdfDoc.embedPng or pdfDoc.embedJpg to load the image bytes.
-
Utilize page.drawImage() with the opacity and transformation parameters.
-
Calculate the aspect ratio to prevent image stretching during scaling.
Suggested Labels
NSoC'26, enhancement
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
Use
pdfDoc.embedPngorpdfDoc.embedJpgto load the image bytes.Utilize
page.drawImage()with the opacity and transformation parameters.Calculate the aspect ratio to prevent image stretching during scaling.
Suggested Labels
NSoC'26, enhancement