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]: Compress level #2366

Open
1 task done
Zalk0 opened this issue Nov 30, 2024 · 8 comments
Open
1 task done

[Bug]: Compress level #2366

Zalk0 opened this issue Nov 30, 2024 · 8 comments
Labels
needs investigation Issues that require further investigation

Comments

@Zalk0
Copy link

Zalk0 commented Nov 30, 2024

Installation Method

None

The Problem

The compress level selection goes from 1 to 9 instead of 1 to 4 previously and the pdf doesn't seem to change size whatever the compress level I select.
image

Version of Stirling-PDF

0.35.0

Last Working Version of Stirling-PDF

0.33.1

Page Where the Problem Occurred

https://stirlingpdf.io/compress-pdf

Docker Configuration

No response

Relevant Log Output

No response

Additional Information

I have only tested on the demo stirlingpdf.io and I'm pretty sure it was working correctly in 0.33.1 but now in 0.35.0 it's broken.
Also when dragging a file over the tab the page stays dark with the text "Drop files anywhere to upload" instead of correctly adding the file (I can still interact with the buttons however). I can open another issue for this if needed.

Browsers Affected

Firefox, Chrome

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.
Copy link

dosubot bot commented Nov 30, 2024

Hey @Zalk0! 👋 I'm here to help you with bug-fixing, answering questions, and becoming a contributor. Let's squash those bugs together!

The issue you're experiencing with the compression level in Stirling-PDF version 0.35.0, where the levels range from 1 to 9 instead of 1 to 4, aligns with the current implementation of the compression functionality. The compression level is determined using methods that calculate and adjust the level dynamically based on file size and desired output size, with levels ranging from 1 to 9 [1].

Regarding the drag-and-drop file upload issue, it seems there might be a problem with the overlay not being removed correctly after a file is dropped. The FileDragManager class is responsible for managing these events and overlays, and it should remove the overlay once a file is dropped [2].

If these issues persist, it might be helpful to check for any updates or patches that address these problems in the latest version of Stirling-PDF.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the needs investigation Issues that require further investigation label Nov 30, 2024
@Frooodle
Copy link
Member

Drag and drop will be patched today already have a fix for that
No need to make new issue

@Frooodle
Copy link
Member

Can you send the docker logs of what it's doing for the compression? Will help figure out cause

@Frooodle
Copy link
Member

Sorry just read you only tested on demo and hence can't grab logs

@Zalk0
Copy link
Author

Zalk0 commented Dec 3, 2024

Sorry for the delay in the answer, I'm not at home at the moment.
What I wanted to show is that when you choose the optimization level it should be from 1 to 4 as was previously and it's what written on the page. However now the dropdown menu shows from 1 to 9 and there isn't the text on the option 4 which was terrible for text images or something.
image

@Frooodle
Copy link
Member

Frooodle commented Dec 3, 2024

Yes correct the 1-4 needs changing to say 1-9 now, the backend compression logic has changed

@Frooodle
Copy link
Member

Frooodle commented Dec 3, 2024

For it not working, i believe it should work but it might be your PDF cant be compressed due to its structure, would love to see docker logs to investigate that side

@Zalk0
Copy link
Author

Zalk0 commented Dec 4, 2024

I'll try to compress again later when I can, thanks for your work 👍
I liked the indication of the compression level being too much to be able to read text images. So if it's still relevant it would be cool to have it back.

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

No branches or pull requests

2 participants