Stirling-PDF/app
Balázs Szücs 2ef89101c2
feat(pdf-info): refactor and add more info on attachments, images, forms, and give technical overview (#4643)
# 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>
2025-10-16 22:54:25 +01:00
..
common fix(security): harden URL reachability to block SSRF to private/reserved networks and add unit tests (#4637) 2025-10-16 22:40:08 +01:00
core feat(pdf-info): refactor and add more info on attachments, images, forms, and give technical overview (#4643) 2025-10-16 22:54:25 +01:00
proprietary feat(pdf-to-cbr): integrate RAR for CBR output generation (#4626) 2025-10-10 14:10:44 +01:00
allowed-licenses.json feat(cbr-to-pdf,pdf-to-cbr): add PDF to/from CBR conversion with ebook optimization option (#4581) 2025-10-04 11:15:23 +01:00