#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Discard qpdf compression output when it grows the file; bump to 3.2.1 (#8586)
Anthony Stirling8a13be2fa9d9
diff --git a/.github/aur/stirling-pdf-desktop/PKGBUILD b/.github/aur/stirling-pdf-desktop/PKGBUILDindex 40e523e919..618b2c75fb 100644--- a/.github/aur/stirling-pdf-desktop/PKGBUILD+++ b/.github/aur/stirling-pdf-desktop/PKGBUILD@@ -1,6 +1,6 @@# Maintainer: Stirling PDF Inc <[email protected]>pkgname=stirling-pdf-desktop-pkgver=3.2.0+pkgver=3.2.1pkgrel=1pkgdesc="Locally hosted, web-based PDF manipulation tool (Tauri desktop app, official Stirling PDF Inc build)"arch=('x86_64')diff --git a/.github/aur/stirling-pdf-server-bin/PKGBUILD b/.github/aur/stirling-pdf-server-bin/PKGBUILDindex 626810da44..38ef47b03b 100644--- a/.github/aur/stirling-pdf-server-bin/PKGBUILD+++ b/.github/aur/stirling-pdf-server-bin/PKGBUILD@@ -1,6 +1,6 @@# Maintainer: Stirling PDF Inc <[email protected]>pkgname=stirling-pdf-server-bin-pkgver=3.2.0+pkgver=3.2.1pkgrel=1pkgdesc="Locally hosted, web-based PDF manipulation tool (server JAR, prebuilt)"arch=('any')diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.javaindex 907f993237..03943ba87e 100644--- a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java+++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java@@ -1404,10 +1404,15 @@ public class CompressController {ProcessExecutor.getInstance(ProcessExecutor.Processes.QPDF).runCommandWithOutputHandling(command, null);- // Update current file to the QPDF output+ long postQpdfSize = Files.size(qpdfOutputPath);+ if (postQpdfSize >= preQpdfSize) {+ log.info(+ "QPDF output ({}) is not smaller than its input, keeping the input",+ GeneralUtils.formatBytes(postQpdfSize));+ return;+ }Files.copy(qpdfOutputPath, currentFile, StandardCopyOption.REPLACE_EXISTING);- long postQpdfSize = Files.size(currentFile);double qpdfReduction = 100.0 - ((postQpdfSize * 100.0) / preQpdfSize);log.info("Post-QPDF file size: {} (reduced by {}%)",diff --git a/build.gradle b/build.gradleindex 7d5874d859..f9708e7848 100644--- a/build.gradle+++ b/build.gradle@@ -122,7 +122,7 @@ springBoot {allprojects {group = 'stirling.software'- version = '3.2.0'+ version = '3.2.1'configurations.configureEach {exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"diff --git a/frontend/editor/src-tauri/tauri.conf.json b/frontend/editor/src-tauri/tauri.conf.jsonindex acbd8bf980..4f8ffa2cf9 100644--- a/frontend/editor/src-tauri/tauri.conf.json+++ b/frontend/editor/src-tauri/tauri.conf.json@@ -2,7 +2,7 @@"$schema": "../../node_modules/@tauri-apps/cli/config.schema.json","productName": "Stirling PDF","mainBinaryName": "Stirling-PDF",- "version": "3.2.0",+ "version": "3.2.1","identifier": "stirling.pdf.dev","build": {"frontendDist": "../dist",