Stirling-PDF/app/core
OUNZAR Aymane 9ea0edccde
A fix for the bug : Extract Pages produce output pdf of same size (issue #1480) (#4636)
# Description of Changes

<!--
Please provide a summary of the changes, including:

Previously, the extraction logic reused the same PDF document instance.
It deleted all existing pages, then re-added only the pages that needed
to be extracted. However, some PDFs define a shared Resources dictionary
at the document level. In those cases, even after page deletion, the
shared resources remained, leading to incorrect or bloated output.

The updated implementation now creates a new PDF document based on the
old document. It copies only the selected pages from the original
document into this new file. This ensures no leftover shared resources
or unwanted metadata are carried over from the source PDF.

Closes #1480 
-->

---

## 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
- [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/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] 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.

---------

Co-authored-by: YAOU Reda <yaoureda24@gmail.com>
2025-10-16 22:19:05 +01:00
..
src A fix for the bug : Extract Pages produce output pdf of same size (issue #1480) (#4636) 2025-10-16 22:19:05 +01:00
.gitignore feat(security): add PFX alias for PKCS12; accept .crt/.cer/.der certs & .key keys; add certificate-signing tests (#4297) 2025-09-04 15:30:32 +01:00
build.gradle build(deps): bump io.micrometer:micrometer-core from 1.15.3 to 1.15.4 (#4420) 2025-10-06 10:48:45 +01:00