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

fix(pdf): resolve compression error and file overwrite issues #2937

Conversation

Abdurrahman-shaikh
Copy link
Contributor

Description of Changes

  • What was changed:

    • Modified the file handling logic to avoid overwriting the source PDF while it is being read, which previously led to corrupted output files.
      -Modified the logic where optimizeLevel is 9 and we are chacking for optimizeLevel < 9.
  • Why the change was made:

    • The original compression process would stuck when dealing with larger files, failing to meet the specified target size limits.
    • Overwriting the input file during processing was causing warnings and potential file corruption, which could lead to instability and incorrect outputs.
  • Any challenges encountered:

Closes #2930


Checklist

General

Documentation

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

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. Bug Something isn't working labels Feb 12, 2025
@github-actions github-actions bot added Java Pull requests that update Java code Back End Issues related to back-end development API API-related issues or pull requests labels Feb 12, 2025
@Frooodle Frooodle merged commit 41b4199 into Stirling-Tools:main Feb 12, 2025
8 of 9 checks passed
@Abdurrahman-shaikh Abdurrahman-shaikh deleted the fix/issue-2930-compression-error branch February 13, 2025 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API-related issues or pull requests Back End Issues related to back-end development Bug Something isn't working Java Pull requests that update Java code size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Compression error dont finish : console output
3 participants