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

[New feature] Inline web reader? #367

Open
C-Duv opened this issue Aug 31, 2017 · 6 comments
Open

[New feature] Inline web reader? #367

C-Duv opened this issue Aug 31, 2017 · 6 comments

Comments

@C-Duv
Copy link

C-Duv commented Aug 31, 2017

Could COPS directly serve books' pages as text and/or images via the browser?
With recent browsers being able to read PDF this is not an issue for PDF ebooks, but other formats are not supported by browsers and requires a separate reader software.

Each ebook's page would be a separate HTML document/page (with it's own HTTP URL).
This would need COPS to handle book's conversion from original format (the one in Calibre's library: PDF, MOBI, EPUB, etc.) to plain text and images, and also generate HTML documents.

I guess mainly-text formats like MOBI/EPUB/... can easily be converted into text and that the ebooks graphics in this format are easily extractable. Text and image would be assembled in a HTML document
For mainly-graphic formats like PDF/CBZ/... COPS should create an image for the requested ebook's page and serve it as-is in an HTML document.

With such feature COPS would then not only be a file server, but also a content/page server and any web browser would be an ebook reader.
Obviously the reading would be on-line only: no ebook fragment would be stored on the device.

@marioscube
Copy link

If you want to read your epubs in a browser. then take a look at Ubooquity https://vaemendis.net/ubooquity/

@seblucas
Copy link
Owner

Could COPS directly serve books' pages as text and/or images via the browser?
With recent browsers being able to read PDF this is not an issue for PDF ebooks, but other formats are > not supported by browsers and requires a separate reader software.

The answer is yes, for now I force every single file format served from COPS to be treated as an attachment so the browser propose to download it. I can make it optional (or smarter) to make use of the integrated PDF Reader (Chrome / Firefox) and Epub Reader (Edge) and even your favourite reader installed on your machine.

For now there an integrated Epub reader in COPS, I'm seriously thinking of removing it. I'm never using it, I never read on a browser : I have a e-ink reader for books and I'm still buying only hard copies for my comics (I'm not ready for e-comics / CBZ CBR).

I'm still thinking about it but that's my current state of mind.

@horus68
Copy link
Contributor

horus68 commented Sep 15, 2017

I also do not read on a browser but I use the browser when promoting the software and to show people the epub books directly on browser. Its just a simple "see this is the book in special format" or you can also have the old PDF file.

@C-Duv
Copy link
Author

C-Duv commented Sep 17, 2017

The answer is yes, for now I force every single file format served from COPS to be treated as an attachment so the browser propose to download it. I can make it optional (or smarter) to make use of the integrated PDF Reader (Chrome / Firefox) and Epub Reader (Edge) and even your favourite reader installed on your machine.

I rather get HTML with <img> than PDF file (whatever the render I use) because PDF format requires to download the full document. With HTML I can fluently read it page by page (see it as a "page streamer").

Thanks, marioscube, I'll look into Ubooquity...

@rockonedege
Copy link
Contributor

I submitted a PR #374 to implement the feature by adding a button side by side. Admittedly, it's my first touch on PHP and a surely ugly hack. Feel free to improve both the idea and the code.

@9Skrip
Copy link

9Skrip commented Dec 30, 2018

I would like a web pdf reader to.

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

No branches or pull requests

6 participants