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

Feat: PDF support via Imgproxy #1637

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Soxasora
Copy link
Contributor

@Soxasora Soxasora commented Nov 22, 2024

Description

Completes #853.
These changes allows for PDFs to be uploaded and processed by Imgproxy. At the moment it retrieves the first page of an uploaded PDF to be displayed as a thumbnail, setting the quality, the color background and DPI per Imgproxy options.

Screenshots

n/a

Additional Context

This is an exclusive Imgproxy PRO feature, other than following the documentation, AFAIK there's no way for me to test this functionality. Therefore i'll draft this PR until we're sure it works.

The issue asked for total pdf to image conversion but then later for native upload (for long pdfs), should we convert all the pdf?

Checklist

Are your changes backwards compatible? Please answer below:
Being an addition with processing and detection happening only after image/video, it shouldn't affect existing uploads

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
2.

  • PDFs do upload and can be accessed
  • Images and videos completely work as before
  • Functionality cannot be tested as this is an imgproxy pro only feature and I don't have access to it atm.

For frontend changes: Tested on mobile, light and dark mode? Please answer below:
Color background for PDF is set to be white

Did you introduce any new environment variables? If so, call them out explicitly here: No

@Soxasora
Copy link
Contributor Author

PDF only? What about epubs?

-- https://stacker.news/items/429663

epubs can be converted to PDF via epub-parser. If support is still wanted we need to evaluate adding this library

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.

1 participant