mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-06 18:30:57 +00:00

# Description of Changes Please provide a summary of the changes, including: This pull request introduces the "Fake Scan" feature, which simulates scanned PDFs with customizable settings. The changes include the removal of a work-in-progress controller, the addition of a new request model, and updates to the frontend to support the feature. ### Backend Changes: * **Removed the unfinished `FakeScanControllerWIP`:** The entire `FakeScanControllerWIP` class, which contained unimplemented and experimental code for processing PDFs, has been removed. This cleanup eliminates unused code and dependencies. Some of the original code of removed file was ported to the new Controller. * **Added `FakeScanRequest` model:** Introduced a new model class `FakeScanRequest` to handle input parameters for the "Fake Scan" feature. It includes fields for file input, quality, rotation, colorspace, and other advanced settings, with validation and default values. ### Frontend Changes: * **Localization updates for the "Fake Scan" feature:** Added new localization keys for the "Fake Scan" feature, including titles, descriptions, and advanced settings options like quality, rotation, and colorspace. * **Added "Fake Scan" card to the homepage ### Pictures: Front-end  Example document (based on defaults; can be drastically changed according to need.):  ### Quirks/known issues - Performance: It might take even reasonable hardware to convert bigger pdf >500KB more than a few minutes. - Yellowish filter applies to the whole document and also incl to the background. (not desirable in some instances) - There is some randomness involved in the default preset, helps imitate scan but some user might find it annoying. (but it can be disabled through advanced settings). - Some features might confusing to people with no additional context. Closes #458 --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [x] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [x] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details.