mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
# Description of Changes ### UI and Summary Enhancements * Added a "Technical Details" section to the PDF summary UI, displaying information such as images, fonts, color spaces, form fields, embedded files, JavaScript, layers, bookmarks, and multimedia. This includes new HTML markup and corresponding translation string. * Populated the new technical details fields in the summary using data from the backend response, including logic to count and display images, fonts, color spaces, form fields, embedded files, JavaScript scripts, layers, bookmarks, and multimedia items. ### Refactor: - Refactored getPdfInfo function (which was 400 lines) to multiple manageable size functions - Extract magic numbers to named constants: - `72` (PPI) should be a named constant like `POINTS_PER_INCH` - `1.0f` (tolerance) should be a named constant like `DEFAULT_TOLERANCE` - `5` (max logged errors) should be a named constant like `MAX_LOGGED_ERRORS` - Make the keyBuilder optimization for page prefixes effective - Used `String.format()` for better readability in complex string constructions - Replace abbreviated variable names with descriptive alternatives: - `ap` (AccessPermission) → `accessPermission` - `is` (InputStream) → `inputStream` or `pdfInputStream` - Improved attachment processing, and other features see below: ### Features: #### Technical details overview: <img width="658" height="737" alt="image" src="https://github.com/user-attachments/assets/60d0658c-27f1-4a48-afbd-7f6a8594dffc" /> #### Form fields: <img width="458" height="800" alt="image" src="https://github.com/user-attachments/assets/d985b7e1-a9a2-4d27-a856-da8754fbb133" /> #### Embedded file new fields; MIME type, creation/modification date <img width="506" height="794" alt="image" src="https://github.com/user-attachments/assets/067eac9e-28b9-4659-af97-56c9a90cb0ec" /> #### Images: <img width="658" height="247" alt="image" src="https://github.com/user-attachments/assets/c915bd45-8de8-4ef0-95cc-04b2cd23bfdb" /> And few other more minor improvements. <!-- Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --> --- ## 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/devGuide/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/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [ ] 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/devGuide/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/devGuide/DeveloperGuide.md#6-testing) for more details. --------- Signed-off-by: Balázs Szücs <bszucs1209@gmail.com> |
||
|---|---|---|
| .. | ||
| common | ||
| core | ||
| proprietary | ||
| allowed-licenses.json | ||