Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

add paging seal function

Open hxlcw opened this issue 1 year ago • 2 comments

Description

Please provide a summary of the changes, including relevant motivation and context.

I have added a feature to the Stirling-PDF project that allows users to add a paging seal to their PDF documents. By uploading a PDF file and an image of the seal, users can adjust the seal’s size on the first page, transparency, and Y-axis position. This feature enables users to place a seal that spans across multiple pages, with each page showing a part of the seal.

Checklist:

  • [x] I have read the Contribution Guidelines
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings

Contributor License Agreement

By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under the MPL 2.0 (Mozilla Public License Version 2.0) license.

(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)

hxlcw avatar Jul 09 '24 07:07 hxlcw

Sorry for not getting to this been way to busy, can you show some example outputs? and of the UI page just so I have more context

Frooodle avatar Jul 20 '24 09:07 Frooodle

A "Paging Seal" is a security measure where a single stamp or seal is applied across the edge of multiple pages of a document, typically along the rightmost side. This ensures that the pages are physically linked and cannot be easily separated or altered without detection. The purpose of the paging seal is to prevent tampering or unauthorized changes to the document.

Here is the UI page where you can choose a PDF file and a seal image file, and edit the seal rate of the first page , the seal size, seal opacity, seal Y position. image

Here is the output. When the 'First Page Rate' is set to 0.5 (meaning 50%), the output will look like this. image

Page 1 sealed (1).pdf

hxlcw avatar Jul 22 '24 01:07 hxlcw

I think we already have a stamp feature for this Can you confirm? Would there be any new functionality brought?

Frooodle avatar Jul 22 '24 06:07 Frooodle

The old stamp function only stamps one picture or text onto a PDF file, but this new function focuses on stamping the same image onto every page of the PDF file, ensuring it appears evenly distributed on each page. Both are stamp functions, but the old one cannot do what I want to do.

hxlcw avatar Jul 22 '24 06:07 hxlcw

This should enhance or replace previous stamp function not be an addition, we shouldn't duplicate this

Frooodle avatar Jul 22 '24 08:07 Frooodle

Okay, I understand. I will close this request now. Maybe next time, I can enhance the existing stamp feature and commit the changes.

hxlcw avatar Jul 22 '24 08:07 hxlcw

It would be a brilliant enhancement please do!

Frooodle avatar Jul 22 '24 08:07 Frooodle