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

ENH: Add an uncompress functionality #38

Closed
3052 opened this issue Nov 27, 2023 · 6 comments · Fixed by #75
Closed

ENH: Add an uncompress functionality #38

3052 opened this issue Nov 27, 2023 · 6 comments · Fixed by #75

Comments

@3052
Copy link

3052 commented Nov 27, 2023

Is it possible to uncompress PDF? similar to:

# uncompress
qpdf --stream-data=uncompress a.pdf b.pdf
# compress
qpdf b.pdf c.pdf

https://github.com/qpdf/qpdf/releases

@Lucas-C
Copy link
Member

Lucas-C commented Dec 15, 2023

Hi @3052

No, currently pdfly does not offer such functionality

@MartinThoma MartinThoma changed the title uncompress ENH: Add an uncompress feature Dec 16, 2023
@MartinThoma MartinThoma changed the title ENH: Add an uncompress feature ENH: Add an uncompress functionality Dec 16, 2023
@Lucas-C Lucas-C added enhancement New feature or request good first issue Good for newcomers up-for-grabs hacktoberfest labels Oct 29, 2024
@Kaos599
Copy link
Contributor

Kaos599 commented Oct 30, 2024

hey @MartinThoma, @Lucas-C i have tried working on this feature but i am not able to find out where you are referencing packages in pdfly?

I need to add uncompress.py there

@Lucas-C
Copy link
Member

Lucas-C commented Oct 30, 2024

i am not able to find out where you are referencing packages in pdfly?

You could intiate a new .py file in https://github.com/py-pdf/pdfly/tree/main/pdfly

And then reference it in https://github.com/py-pdf/pdfly/blob/main/pdfly/cli.py

@Kaos599
Copy link
Contributor

Kaos599 commented Oct 30, 2024

@Lucas-C I have implemented the feature but i am having trouble linting it with black, my local system with black shows no need for reformatting while the CI run fails with Black error.

Especially if i format it with Black then ruff results in an error and if format it with ruff then black results in error

@Lucas-C
Copy link
Member

Lucas-C commented Oct 30, 2024

i am having trouble linting it with black, my local system with black shows no need for reformatting while the CI run fails with Black error.

What is the error you are facing exactly?

And what is your version of black?

On my side:

$ black --version
black, 24.10.0 (compiled: yes)

@Kaos599
Copy link
Contributor

Kaos599 commented Oct 30, 2024

i am having trouble linting it with black, my local system with black shows no need for reformatting while the CI run fails with Black error.

What is the error you are facing exactly?

And what is your version of black?

On my side:

$ black --version
black, 24.10.0 (compiled: yes)

From my tinkering, everything is compliant except the I001 rule in ruff which checks for "Imports not at the top of the file." in the cli.py file

I dont know how but its somehow messing with black.

if i use ruff format cli.py it formats these.

And as for the version issue with black, i used github codespaces and that solved the issue.

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