Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: A fixed bug appeared in a newer version. #2952

Open
1 task done
stinger679 opened this issue Feb 14, 2025 · 6 comments · May be fixed by #3002
Open
1 task done

[Bug]: A fixed bug appeared in a newer version. #2952

stinger679 opened this issue Feb 14, 2025 · 6 comments · May be fixed by #3002
Labels
needs investigation Issues that require further investigation

Comments

@stinger679
Copy link

Installation Method

Local Installation

The Problem

I understand that the efficiency bug was supposedly fixed back in version 37.1. However, I'm running version 38.0, and I'm still encountering the issue. There was a previous hypothesis that it might be due to only a single image being compressed within the file. The compression process runs indefinitely and yields no results.

Version of Stirling-PDF

0.38.0

Last Working Version of Stirling-PDF

No response

Page Where the Problem Occurred

http://localhost:8080/compress-pdf

Docker Configuration

Relevant Log Output

фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.381 [Thread-17130] INFO  s.s.SPDF.utils.ProcessExecutor - qpdf: operation succeeded with warnings; resulting file may have some problems
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.383 [qtp17608784-117] INFO  s.s.SPDF.utils.ProcessExecutor - Running command: qpdf --optimize-images --recompress-flate --compression-level=9 --compress-streams=y --object-streams=generate /tmp/input_11237122787954974791.pdf /tmp/output_13474771323943889482.pdf
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.383 [qtp17608784-159] INFO  s.s.S.c.api.misc.CompressController - Current compression ratio: 2,18
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.388 [qtp17608784-159] WARN  o.apache.pdfbox.pdmodel.PDDocument - You are overwriting the existing file input_3455338046380592163.pdf, this will produce a corrupted file if you're also reading from it
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.389 [Thread-17134] INFO  s.s.SPDF.utils.ProcessExecutor - WARNING: /tmp/input_11237122787954974791.pdf: reported number of objects (1601) is not one plus the highest object number (1599)
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.391 [Thread-17132] INFO  s.s.SPDF.utils.ProcessExecutor - qpdf: operation succeeded with warnings; resulting file may have some problems
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.391 [qtp17608784-456] INFO  s.s.SPDF.utils.ProcessExecutor - Running command: qpdf --optimize-images --recompress-flate --compression-level=9 --compress-streams=y --object-streams=generate /tmp/input_5124983596541448419.pdf /tmp/output_7461192262171203455.pdf
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.391 [qtp17608784-2644] INFO  s.s.S.c.api.misc.CompressController - Current compression ratio: 2,18
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.398 [qtp17608784-2644] WARN  o.apache.pdfbox.pdmodel.PDDocument - You are overwriting the existing file input_16718023660214907066.pdf, this will produce a corrupted file if you're also reading from it
фев 14 15:00:41 srv-pdftools.nahodka.market java[11209]: 15:00:41.401 [Thread-17136] INFO  s.s.SPDF.utils.ProcessExecutor - WARNING: /tmp/input_5124983596541448419.pdf: reported number of objects (1931) is not one plus the highest object number (1929)

Additional Information

No response

Browsers Affected

No response

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.
@dosubot dosubot bot added the needs investigation Issues that require further investigation label Feb 14, 2025
@Frooodle
Copy link
Member

Can you try on 0.41.0?

@stinger679
Copy link
Author

@Frooodle

This on 0.41.0 and the same file

Feb 14 15:52:29 kali java[5924]: 15:52:29.769 [Thread-22992] INFO s.s.SPDF.utils.ProcessExecutor - WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11503) is not one plus the highest object number (11501)
Feb 14 15:52:29 kali java[5924]: 15:52:29.779 [Thread-22992] INFO s.s.SPDF.utils.ProcessExecutor - qpdf: operation succeeded with warnings; resulting file may have some problems
Feb 14 15:52:29 kali java[5924]: 15:52:29.780 [qtp2144965699-45] WARN s.s.SPDF.utils.ProcessExecutor - qpdf succeeded with warnings: WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11503) is not one plus the highest object number (11501)
Feb 14 15:52:29 kali java[5924]: qpdf: operation succeeded with warnings; resulting file may have some problems
Feb 14 15:52:29 kali java[5924]: 15:52:29.780 [qtp2144965699-45] WARN s.s.SPDF.utils.ProcessExecutor - qpdf succeeded with warnings: WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11503) is not one plus the highest object number (11501)
Feb 14 15:52:29 kali java[5924]: qpdf: operation succeeded with warnings; resulting file may have some problems
Feb 14 15:52:29 kali java[5924]: 15:52:29.780 [qtp2144965699-45] INFO s.s.S.c.api.misc.CompressController - Current compression ratio: 2.18
Feb 14 15:52:29 kali java[5924]: 15:52:29.784 [qtp2144965699-45] WARN o.apache.pdfbox.pdmodel.PDDocument - You are overwriting the existing file input_1929362739446815544.pdf, this will produce a corrupted file if you're also reading from it
Feb 14 15:52:29 kali java[5924]: 15:52:29.787 [qtp2144965699-45] INFO s.s.SPDF.utils.ProcessExecutor - Running command: qpdf --optimize-images --recompress-flate --compression-level=9 --compress-streams=y --object-streams=generate /tmp/input_1929362739446815544.pdf /tmp/output_9971689979523511385.pdf
Feb 14 15:52:29 kali java[5924]: 15:52:29.791 [Thread-22994] INFO s.s.SPDF.utils.ProcessExecutor - WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11504) is not one plus the highest object number (11502)

@Abdurrahman-shaikh
Copy link
Contributor

@Frooodle

This on 0.41.0 and the same file

Feb 14 15:52:29 kali java[5924]: 15:52:29.769 [Thread-22992] INFO s.s.SPDF.utils.ProcessExecutor - WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11503) is not one plus the highest object number (11501) Feb 14 15:52:29 kali java[5924]: 15:52:29.779 [Thread-22992] INFO s.s.SPDF.utils.ProcessExecutor - qpdf: operation succeeded with warnings; resulting file may have some problems Feb 14 15:52:29 kali java[5924]: 15:52:29.780 [qtp2144965699-45] WARN s.s.SPDF.utils.ProcessExecutor - qpdf succeeded with warnings: WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11503) is not one plus the highest object number (11501) Feb 14 15:52:29 kali java[5924]: qpdf: operation succeeded with warnings; resulting file may have some problems Feb 14 15:52:29 kali java[5924]: 15:52:29.780 [qtp2144965699-45] WARN s.s.SPDF.utils.ProcessExecutor - qpdf succeeded with warnings: WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11503) is not one plus the highest object number (11501) Feb 14 15:52:29 kali java[5924]: qpdf: operation succeeded with warnings; resulting file may have some problems Feb 14 15:52:29 kali java[5924]: 15:52:29.780 [qtp2144965699-45] INFO s.s.S.c.api.misc.CompressController - Current compression ratio: 2.18 Feb 14 15:52:29 kali java[5924]: 15:52:29.784 [qtp2144965699-45] WARN o.apache.pdfbox.pdmodel.PDDocument - You are overwriting the existing file input_1929362739446815544.pdf, this will produce a corrupted file if you're also reading from it Feb 14 15:52:29 kali java[5924]: 15:52:29.787 [qtp2144965699-45] INFO s.s.SPDF.utils.ProcessExecutor - Running command: qpdf --optimize-images --recompress-flate --compression-level=9 --compress-streams=y --object-streams=generate /tmp/input_1929362739446815544.pdf /tmp/output_9971689979523511385.pdf Feb 14 15:52:29 kali java[5924]: 15:52:29.791 [Thread-22994] INFO s.s.SPDF.utils.ProcessExecutor - WARNING: /tmp/input_1929362739446815544.pdf: reported number of objects (11504) is not one plus the highest object number (11502)

@stinger679
Does the PDF compression process complete despite the warnings, or does it run indefinitely in version 0.41.0?

@stinger679
Copy link
Author

@Abdurrahman-shaikh

indefinitely processing

@Abdurrahman-shaikh
Copy link
Contributor

@Frooodle
It looks like the issue might not be with the PDF file itself but rather a problem with qpdf. Here's the related issue:qpdf/qpdf#1292.

I've tested this error locally and observed the same behavior. I suggest ignoring this issue for now and proceeding with the code as is.

Image

Would it be possible for me to work on this?

@Frooodle
Copy link
Member

@Abdurrahman-shaikh Sure!

Abdurrahman-shaikh added a commit to Abdurrahman-shaikh/Stirling-PDF that referenced this issue Feb 20, 2025
@Abdurrahman-shaikh Abdurrahman-shaikh linked a pull request Feb 20, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Issues that require further investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants