Skip to content

feat: add Crop PDF function#9

Open
LorenzoLancia wants to merge 6 commits intoGSiesto:mainfrom
LorenzoLancia:feature/crop
Open

feat: add Crop PDF function#9
LorenzoLancia wants to merge 6 commits intoGSiesto:mainfrom
LorenzoLancia:feature/crop

Conversation

@LorenzoLancia
Copy link
Copy Markdown
Contributor

@LorenzoLancia LorenzoLancia commented Apr 1, 2026

Description

This PR introduces a Crop feature that allows users to select and trim a specific area of a PDF page.

Users can define a custom region to remove unnecessary margins or unwanted content. The crop is applied directly to the PDF while preserving the original quality, and the updated result is reflected immediately in the viewer.

Key benefits:

  • Remove white borders or extra spacing
  • Focus on relevant sections of a document
  • Produce cleaner and more readable PDFs

This feature improves document usability and provides more precise control over PDF content within the application.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Test A: add test run with npm run test:e2e And I have conducted extensive personal testing by manually cropping PDFs.
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant