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 PDF.js viewer for PDF files #795

Closed
mbrgm opened this issue May 29, 2016 · 6 comments
Closed

Add PDF.js viewer for PDF files #795

mbrgm opened this issue May 29, 2016 · 6 comments

Comments

@mbrgm
Copy link

mbrgm commented May 29, 2016

Would PDF.js be a conceivable addition to the Web UI? This could allow viewing PDFs just like it is already possible for images.

@mpl
Copy link
Contributor

mpl commented May 30, 2016

Maybe? :-)

Since chrome (I don't know about other browsers) already allows viewing PDFs, I don't know how much of a gain that would be. If you select a pdf permanode, then click on "view original", then you can read the PDF without any need of a 3rd party lib.
It would be nice to have a preview of the PDF displayed instead of the blank permanode "icon" but I suspect we could (and hence would like to) do most of the work for that server-side. But I haven't thought about that much, so again, maybe.

Thanks for the link though.

@mbrgm
Copy link
Author

mbrgm commented May 30, 2016

I think it also depends on what's the general philosophy regarding (pre-)viewing several filetypes in the Web UI. Obviously, previewing images and videos just works™ when clicking on the icon, but for .pdf or .txt files, users have to 'view original' in order to read the document. Clicking the icon only gives 'no result found', while there's a special view for images and videos.

Maybe you could elaborate on whether there are plans for handling various filetypes @mpl?

@mpl
Copy link
Contributor

mpl commented May 30, 2016

@mbrgm There are no definite/precise plans that I know of. Easy handling of common files (such as text or pdf) is definitely on the table, and how to do it is open for discussion.
It just happens that:

  1. We usually favor server-side work if we can
  2. We're kindof in the middle of (re)defining how we're going to work on the UI moving forward
  3. In the long run, even the web UI could be a stand-alone app, which should make it easier for anyone to swap it with their own, preferred, app/UI.

@bradfitz
Copy link
Contributor

I'd like to see PDF support, especially if it helps with thumbnails of PDFs or easier browsing of PDFs with our UI overlayed (in any browser, not just Chrome).

@ginabythebay
Copy link
Contributor

Perhaps consider poppler? https://poppler.freedesktop.org/. Works on windows and unix-like systems.

It includes the command line tool pdftocairo which can convert pdfs to jpegs, so could be used to create thumbnails. I use the poppler code every day to view pdfs in emacs on windows (via pdf-utils) and have yet to find a pdf it won't display but that adobe or chrome will.

@mpl
Copy link
Contributor

mpl commented May 3, 2019

I think https://perkeep-review.googlesource.com/c/perkeep/+/19206 will address this issue.

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

No branches or pull requests

4 participants