From dd09f7b7cf6e19506983975165fbd8797da566c3 Mon Sep 17 00:00:00 2001
From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
Date: Fri, 9 Jan 2026 12:28:15 +0000
Subject: [PATCH] minor changes (#5419)
# Description of Changes
OLD
(MEMBER tag)
NEW
---
## Checklist
### General
- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] 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)
- [ ] 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)
### Translations (if applicable)
- [ ] I ran
[`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md)
### 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)
- [ ] 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.
---
.../api/SplitPdfBySectionsController.java | 36 +++++++++++++++++++
.../config/configSections/PeopleSection.tsx | 8 ++---
.../configSections/TeamDetailsSection.tsx | 2 +-
.../config/configSections/TeamsSection.tsx | 1 -
.../features/steps/step_definitions.py | 8 +++--
5 files changed, 46 insertions(+), 9 deletions(-)
diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java
index 91f892761..44b350e9e 100644
--- a/app/core/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java
+++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java
@@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import stirling.software.SPDF.model.SplitTypes;
import stirling.software.SPDF.model.api.SplitPdfBySectionsRequest;
@@ -40,6 +41,7 @@ import stirling.software.common.util.TempFile;
import stirling.software.common.util.TempFileManager;
import stirling.software.common.util.WebResponseUtils;
+@Slf4j
@RestController
@RequestMapping("/api/v1/general")
@Tag(name = "General", description = "General APIs")
@@ -98,6 +100,9 @@ public class SplitPdfBySectionsController {
}
}
mergedDoc.save(out);
+ } catch (IOException e) {
+ log.error("Error creating merged PDF document", e);
+ throw e;
}
return WebResponseUtils.pdfFileToWebResponse(tempFile, filename + ".pdf");
} else {
@@ -132,6 +137,13 @@ public class SplitPdfBySectionsController {
+ sectionNum
+ ".pdf";
saveDocToZip(subDoc, zipOut, entryName);
+ } catch (IOException e) {
+ log.error(
+ "Error creating section {} for page {}",
+ (i * verti + j + 1),
+ pageNum,
+ e);
+ throw e;
}
}
}
@@ -141,12 +153,21 @@ public class SplitPdfBySectionsController {
addPageToTarget(sourceDocument, pageIndex, subDoc, subLayerUtility);
String entryName = filename + "_" + pageNum + "_1.pdf";
saveDocToZip(subDoc, zipOut, entryName);
+ } catch (IOException e) {
+ log.error("Error processing unsplit page {}", pageNum, e);
+ throw e;
}
}
}
+ } catch (IOException e) {
+ log.error("Error creating ZIP file with split PDF sections", e);
+ throw e;
}
return WebResponseUtils.zipFileToWebResponse(zipTempFile, filename + ".zip");
}
+ } catch (Exception e) {
+ log.error("Error splitting PDF file: {}", file.getOriginalFilename(), e);
+ throw e;
}
}
@@ -161,6 +182,9 @@ public class SplitPdfBySectionsController {
try (PDPageContentStream contentStream =
new PDPageContentStream(targetDoc, newPage, AppendMode.APPEND, true, true)) {
contentStream.drawForm(form);
+ } catch (IOException e) {
+ log.error("Error adding page {} to target document", pageIndex, e);
+ throw e;
}
}
@@ -198,6 +222,10 @@ public class SplitPdfBySectionsController {
contentStream.transform(new Matrix(1, 0, 0, 1, translateX, translateY));
contentStream.drawForm(form);
contentStream.restoreGraphicsState();
+ } catch (IOException e) {
+ log.error(
+ "Error adding split section ({}, {}) for page {}", i, j, pageIndex, e);
+ throw e;
}
}
}
@@ -234,6 +262,14 @@ public class SplitPdfBySectionsController {
contentStream.transform(new Matrix(1, 0, 0, 1, translateX, translateY));
contentStream.drawForm(form);
contentStream.restoreGraphicsState();
+ } catch (IOException e) {
+ log.error(
+ "Error adding single section ({}, {}) for page {} to target",
+ horizIndex,
+ vertIndex,
+ pageIndex,
+ e);
+ throw e;
}
}
diff --git a/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx b/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx
index a43ac3078..cb8a2d8b7 100644
--- a/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx
+++ b/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx
@@ -353,12 +353,12 @@ export default function PeopleSection() {
{/* License Information - Compact */}
{licenseInfo && (
-
-
+
+
{licenseInfo.totalUsers}
/
{licenseInfo.maxAllowedUsers}
- {t('workspace.people.license.users', 'users')}
+ {t('workspace.people.license.users', 'users')}
{licenseInfo.availableSlots === 0 && (
@@ -518,7 +518,7 @@ export default function PeopleSection() {
{(user.rolesAsString || '').includes('ROLE_ADMIN')
? t('workspace.people.admin', 'Admin')
diff --git a/frontend/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsx b/frontend/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsx
index c4f91d969..dc4585653 100644
--- a/frontend/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsx
+++ b/frontend/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsx
@@ -362,7 +362,7 @@ export default function TeamDetailsSection({ teamId, onBack }: TeamDetailsSectio
{(user.rolesAsString || '').includes('ROLE_ADMIN')
diff --git a/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx b/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx
index eb256bc20..b2b9b986a 100644
--- a/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx
+++ b/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx
@@ -280,7 +280,6 @@ export default function TeamsSection() {