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

Basic PDF support #35

Closed
8 tasks done
aaronleopold opened this issue Sep 16, 2022 · 7 comments
Closed
8 tasks done

Basic PDF support #35

aaronleopold opened this issue Sep 16, 2022 · 7 comments
Labels
core Relating to Stump's Rust core feature A planned, integral feature help wanted Extra attention is needed interface Relating to Stump's React interface

Comments

@aaronleopold
Copy link
Collaborator

aaronleopold commented Sep 16, 2022

The server needs to be able to: process, properly handle and serve PDF files. This issue is for basic support, page streaming support will either roll out separately or, depending on how the rest of the below goes, at the same time.

Core Tasks:

  • Add logic to detect PDF mime
  • Add logic for PDF operations:
    • Simple file serving
    • Thumbnail extraction and/or generation
    • Metadata extraction / interpretation
  • Start accepting PDF files during scan

Interface Tasks:

  • PDF Reader (via file serving)
  • Streamable PDF reader
@aaronleopold aaronleopold added this to the 0.0.1 milestone Sep 16, 2022
@aaronleopold aaronleopold added help wanted Extra attention is needed hacktoberfest labels Oct 2, 2022
@berkingurcan
Copy link
Contributor

I can take this.

@aaronleopold
Copy link
Collaborator Author

Sure thing, just assigned you. Thanks!

@aaronleopold
Copy link
Collaborator Author

aaronleopold commented Oct 15, 2022

I think this is promising: https://github.com/ajrcarey/pdfium-render

Depending on how fast of an operation it is to convert a PDF page to a bitmap, that could potentially work for streaming PDF pages. However, that library would easily allow for converting PDF to archive formats I think (also very great) at the very least. Static compilation might be tricky, but there is an entire section for that in their README

This is probably a good start to look for the interface: https://github.com/wojtekmaj/react-pdf

@ghost
Copy link

ghost commented Oct 16, 2022

Agreed, I would like to create a general design spec for this first though, making sure every file format has the same methods so interfacing and documentation become easier if that makes sense.

@aaronleopold
Copy link
Collaborator Author

Sounds good!

@aaronleopold
Copy link
Collaborator Author

aaronleopold commented Sep 9, 2023

Mostly completed this today 🎊 per-page streaming as well as the option to use your browser's native PDF viewer are both available now in my feature branch

The only thing left at this point is to update the Dockerfile to pull in the PDF dependency.

This was referenced Sep 9, 2023
@aaronleopold
Copy link
Collaborator Author

Resolved by #158. I am deploying updated docs to reflect PDF support, but should eventually make a note about PDFium being used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Relating to Stump's Rust core feature A planned, integral feature help wanted Extra attention is needed interface Relating to Stump's React interface
Projects
None yet
Development

No branches or pull requests

2 participants