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

Implement uncompress functionality for PDF files Closes #38 #66

Closed
wants to merge 0 commits into from

Conversation

Kaos599
Copy link
Contributor

@Kaos599 Kaos599 commented Oct 30, 2024

Closes #38

  • Added a new uncompress.py script to decompress Flate-encoded content streams in PDF files.
  • Updated main function to handle PDF input and output paths.
  • Modified pyproject.toml to include the I001 rule for Ruff linter to ignore specific linting issues, since it was conflicting with black.

@Kaos599 Kaos599 changed the title Implement uncompress functionality for PDF files Implement uncompress functionality for PDF files Closes #38 Oct 30, 2024
Comment on lines 49 to 50
except zlib.error as e:
print(f"Decompression error: {e}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
except zlib.error as e:
print(f"Decompression error: {e}")
except zlib.error as error:
print(f"Some content stream with /FlateDecode failed to be decompressed: {error}")

Your strategy there is that a zlib.error should NOT interrupt the command?

I'm OK with that, but maybe the error message should be slightly clearer.

Copy link
Member

@Lucas-C Lucas-C left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @Kaos599 👍

Could you please:

  • add a mention of this new command in README.md
  • add some unit tests in tests/test_uncompress.py

You could for example execute this command on all sample-files/*./*.pdf files, similar to this: #15 (comment)

@Kaos599
Copy link
Contributor Author

Kaos599 commented Nov 8, 2024

SUre

Thank you for your contribution @Kaos599 👍

Could you please:

* add a mention of this new command in `README.md`

* add some unit tests in `tests/test_uncompress.py`

You could for example execute this command on all sample-files/*./*.pdf files, similar to this: #15 (comment)

Sure i will implement those within few days

@Lucas-C
Copy link
Member

Lucas-C commented Nov 13, 2024

Hi @Kaos599

I see that you published a commit on this branch yesterday.
Is is ready for reviewing?
I think that there is still a minor merge conflict to resolve.

@Kaos599
Copy link
Contributor Author

Kaos599 commented Nov 13, 2024

@Lucas-C i have been busy with college exams so i just tried a little yesterday. I still need to implement most of the changes, I will get on it soon and will tag you once done.

Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Add an uncompress functionality
2 participants