refactor(pdf): update PDFBox usage for improved 3.x compatibility (#2079)

* refactor(pdf): update PDFBox usage for 3.x compatibility and improve file handling

- Use RandomAccessReadBufferedFile and RandomAccessStreamCache for loading PDFs
- Update methods to use new PDFBox 3.x APIs for reading and writing
- Add pdfbox-io dependency to build.gradle
- Add comments regarding compressed mode in PDFBox 3.x

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test(pdf): remove outdated comments about PDFBox 3.x default compression in save operations

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test(pdf): remove outdated comments about PDFBox 3.x default compression in save operations

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
Balázs Szücs
2026-01-01 08:50:46 +01:00
committed by GitHub
parent 03311b76ee
commit f3299915f5
5 changed files with 18 additions and 5 deletions

View File

@@ -52,6 +52,7 @@ dependencies {
// --- Book & Image Processing ---
implementation 'org.apache.pdfbox:pdfbox:3.0.6'
implementation 'org.apache.pdfbox:pdfbox-io:3.0.6'
implementation 'org.apache.pdfbox:xmpbox:3.0.6'
implementation 'org.apache.pdfbox:jbig2-imageio:3.0.4'
implementation 'com.github.jai-imageio:jai-imageio-core:1.4.0'