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

Add: Convert PDF to WebP #1666

Merged
merged 9 commits into from
Aug 20, 2024
Merged

Add: Convert PDF to WebP #1666

merged 9 commits into from
Aug 20, 2024

Conversation

Ludy87
Copy link
Contributor

@Ludy87 Ludy87 commented Aug 12, 2024

Description

Please provide a summary of the changes, including relevant motivation and context.

Closes #(issue_number)

Checklist:

  • I have read the Contribution Guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

Contributor License Agreement

By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under the MPL 2.0 (Mozilla Public License Version 2.0) license.

(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)

@Ludy87 Ludy87 requested a review from Frooodle as a code owner August 12, 2024 21:39
@github-actions github-actions bot added Documentation Improvements or additions to documentation Java Pull requests that update Java code Front End Issues or pull requests related to front-end development Docker Pull requests that update Docker code Translation API API-related issues or pull requests labels Aug 12, 2024
@Frooodle
Copy link
Member

Looks like we can use PyMuPDF to do pdfto markdown and others

But also this library seems to have a lot of features... What size does this make the docker 👀

@Ludy87
Copy link
Contributor Author

Ludy87 commented Aug 14, 2024

give me a moment

@Ludy87
Copy link
Contributor Author

Ludy87 commented Aug 14, 2024

As always, there are problems when creating

@Ludy87
Copy link
Contributor Author

Ludy87 commented Aug 15, 2024

linux/amd64

  • 1.07 GB

linux/arm64

  • 1.02 GB

@Frooodle It seems to have gotten a bit bigger :) I'll try to press it a little more

@Ludy87
Copy link
Contributor Author

Ludy87 commented Aug 17, 2024

.github/workflows/pymupdf.yml must be triggered manually once to build the image - duration 1h
After that it is only triggered when the version in the .pymupdf is increased.

The image of latest and fat will increase by about 400-450 MB, unfortunately it will not be any slimmer

@Frooodle
Copy link
Member

Frooodle commented Aug 17, 2024

Okay let me think about this, without more features this is a huge file size jump for up
Would be good to see what we can grab from this for future

@Ludy87
Copy link
Contributor Author

Ludy87 commented Aug 17, 2024

I could try to create mujs, but I don't know anything about it :)

@Ludy87
Copy link
Contributor Author

Ludy87 commented Aug 19, 2024

I removed pymupdf and used pdf2image and pillow instead.
The Docker images are now about 5 MB larger. If you want we can use this.

Stirling Docker size

image

Test Docker size

image

@Frooodle Frooodle merged commit 58618b3 into Stirling-Tools:main Aug 20, 2024
5 checks passed
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 Docker Pull requests that update Docker code Documentation Improvements or additions to documentation Front End Issues or pull requests related to front-end development Github Java Pull requests that update Java code Translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants