seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

added view button to view pdf&epub in the browser #374

Closed rockonedege closed 6 years ago

rockonedege commented 6 years ago

Now that major browsers support viewing pdf(Firefox&Edge) and epub(Edge and Firefox w/ extension) files directly from inside the browsing window, it's my own needs to leverage this functionality for reading ebooks on phones. It might be helpful to others as well.

It's my first time to touch PHP code. Feel free change it.

seblucas commented 6 years ago

Hi,

Thanks for this PR, it seems mostly good. I'll check that out locally and get back to you.

seblucas commented 6 years ago

As a side note, EPUB support on Edge is very picky (many epub I own despite being perfectly valid are not read by Edge)

rockonedege commented 6 years ago

Yes, the EPUB support on Edge is also slow when the file gets large. Hopefully it will get better as it's heavily invested by Microsoft currently.

seblucas commented 6 years ago

Sorry for the delay and thanks again

marioscube commented 6 years ago

Downloading (map icon) does not work on symlinked libraries, only on real paths.

seblucas commented 6 years ago

Hi Mario,

What do you mean ? Is there a difference between the download and the open icons ?

I never used a symlink for my libraries but I see no reason for a discrepancy here.

marioscube commented 6 years ago

Hi Sebastien,

Normally I see no difference. However on a symlinked library he "epub" icon works nomally, but the "map" icon gives a "file not found".

I use firefox on the desktop. The same error with webkit on iOS.