22 Commits

Author SHA1 Message Date
Abdur Rahman
6a3064f7f2
Fix issue #2511: Fix broken ZIP issue by adding zipOut.finish() (#2890)
---

# Description of Changes

### What was changed
- Added `zipOut.finish()` to ensure the ZIP file is properly finalized
after writing all entries.
- This ensures the central directory metadata is written, fixing the
issue where the ZIP file was incomplete or broken.

### Why the change was made
- The issue (#2511) reported that splitting a PDF resulted in a broken
ZIP file. The root cause was the missing central directory due to
improper stream finalization.
- Adding `zipOut.finish()` explicitly ensures the ZIP file is correctly
structured and can be extracted without errors.

### Challenges encountered

Closes #2511

---

## 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)

- [ ] 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.
- Tested with various PDFs to ensure the ZIP file is created correctly.
  - Verified ZIP integrity using `unzip -t` and manual extraction.

---
2025-02-07 13:36:33 +00:00
Ludy87
af100d4190
Remove Direct Logger and Use Lombok @Slf4j 2024-12-17 10:26:18 +01:00
Anthony Stirling
0652299bec fixes 2024-12-09 20:40:59 +00:00
Anthony Stirling
de4144a1a4
Metadata handling for all PDF endpoints (#1894)
* Add image support to multi-tool page

Related to #278

* changes to support image types

* final touches

* final touches

* final touches

Signed-off-by: a <a>

* final touches

Signed-off-by: a <a>

* final touches

Signed-off-by: a <a>

* final touches

Signed-off-by: a <a>

* final touches

Signed-off-by: a <a>

* final touches

Signed-off-by: a <a>

* final touches

Signed-off-by: a <a>

* Update translation files (#1888)

Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>

* final touches

Signed-off-by: a <a>

---------

Signed-off-by: a <a>
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: a <a>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-09-14 16:29:39 +01:00
Anthony Stirling
eb526a5d0c logging and try catch 2024-06-02 11:59:43 +01:00
Anthony Stirling
6ffa80c386 changes 2024-05-27 16:31:00 +01:00
Eric
2f703796e9
fix(SplitPDF): create immutable list for dynamic additions (#877) 2024-03-07 12:05:26 -05:00
懒猫
c8a37245fa
Added option to split PDF into multiple parts and merge into one PDF (#841)
* Added option to split PDF into multiple parts and merge into one PDF

* Use the mergeDocuments method in MergeController to implement merging

---------

Co-authored-by: Eric <71648843+sbplat@users.noreply.github.com>
2024-02-24 15:26:35 -05:00
sbplat
4af58118c9 fix: use the same margins for x and y in the stamp feature 2024-02-07 21:40:33 -05:00
pixeebot[bot]
c8dfe10a7c Sanitized user-provided file names in HTTP multipart uploads 2024-02-01 23:48:27 +00:00
sbplat
06ef09035d fix: remove blank pages not handling EXIT_FAILURE code properly 2024-01-22 10:39:29 -05:00
Anthony Stirling
c8acddb251 Resolve split sections 2024-01-13 01:05:43 +00:00
Anthony Stirling
5281d7a49a pdfbox3 upgrade and fix 2024-01-12 23:15:27 +00:00
Anthony Stirling
6fe268adcb eol 2024-01-03 17:59:04 +00:00
Anthony Stirling
9795c68220 revert 2024-01-01 19:30:43 +00:00
Anthony Stirling
03a8f45128 cleanup 2024-01-01 14:46:19 +00:00
Anthony Stirling
76e6a23674 split fixes 2024-01-01 12:14:46 +00:00
Anthony Stirling
5f771b7851 formatting 2023-12-30 19:11:27 +00:00
Anthony Stirling
eab9e3cffc changes pipeline 2023-12-20 19:29:13 +00:00
Anthony Stirling
57b483047e splitPdf sections cleanup 2023-12-17 12:23:11 +00:00
Anthony Stirling
79dcf99cce Clean imports and lang updates 2023-12-16 19:30:47 +00:00
Anthony Stirling
c28a40ffe8 Split by sections #506 2023-12-16 19:29:43 +00:00