diff --git a/files_reader/CHANGELOG.md b/files_reader/CHANGELOG.md index 3a2d9fe..347a3c6 100644 --- a/files_reader/CHANGELOG.md +++ b/files_reader/CHANGELOG.md @@ -1,4 +1,4 @@ -## UNRELEASED +## 1.1 - 2018-01-18 ### Added - Reader now supports PDF - PDF double page spreads are supported @@ -8,6 +8,7 @@ ### Changed - #38: moved declarations in js/ready.js one level lower to work around a bug in the Palemoon browser - new version bitjs archive tools, fixes compatibility problems with some CBR files + - increased maximum supported version for OC and NC ## 1.0.1 - 2017-03-19 ### Fixed diff --git a/files_reader/README.md b/files_reader/README.md index af26845..ca15d34 100644 --- a/files_reader/README.md +++ b/files_reader/README.md @@ -1,26 +1,30 @@ files_reader ------------ -Reader is an ebook reader based on pure javascript renderers. It works for books formatted according to the following standards: +Reader is an ebook reader based on pure javascript renderers. It works for publications formatted according to the following standards: - [Epub] + - [PDF] - [CBR and CBZ] ('comics') For Epub Reader uses the futurepress [epub.js] renderer to provide near-native looks, especially when used full-screen. Turn pages by pressing the left/right hand side of the screen/window or using the cursor keys (if you have those), use the sidebar to browse through chapters or bookmarks and add annotations. +PDF is handled by Mozilla's [pdf.js] renderer in combination with a custom reader app to enable side-by-side display, batch search and more. Controls are like those used in the Epub renderer with a few exceptions, e.g. night mode has not been implemented yet. + CBR and CBZ are supported using a custom renderer inspired by [balaclark]'s work. As with Epub, books can be navigated using the keyboard as well as mouse or touch navigation. Reader generates a visual index of all pages, show in the sidebar (thumbnail generation can be disabled for low-memory and/or -speed devices). As CBx files are often of varying quality, a set of image enhancement filters are provided. # Features Reader remembers the last-visited page in a book and returns to that page when the book is re-opened. As all settings are stored on the server these features are device-independent, ie. you can start reading on a mobile device, continue on a PC to finish the book on a tablet. -### Text-based formats + +### Text-based formats incl. PDF - seamless full-screen mode supported on browsers which allow full user-control, ie. not on Apple) - single- and double-page viewing mode - user-configurable font and colour settings - - night mode, toggled by clicking the book title/author on top of the viewer + - night mode, toggled by clicking the book title/author on top of the viewer (not yet implemented for PDF) - full-text search with keyword highlighting - bookmarks (with automatic snippet generation) - - annotations + - annotations (not yet implemented for PDF) - keyboard and pointer/touch-based navigation ### CBR/CBZ ('Comics') @@ -32,6 +36,8 @@ Reader remembers the last-visited page in a book and returns to that page when t - visual index (thumbnail size user-configurable, can be disabled for low-memory or -cpu devices) - keyboard and pointer/touch-based navigation +PDF support is still somewhat rough around the edges, not all features have been implemented yet. There is a known cosmetical issue in that in spread mode the (invisible but selectable) text layer for the left page is offset from the left when opening a document. As soon as a page is turned this problem disappears. + ### Keyboard navigation Reader supports both pointer/touch-based as well as keyboard-based navigation. Pointer/touch based is mostly self-explanatory, @@ -54,7 +60,7 @@ Reader supports both pointer/touch-based as well as keyboard-based navigation. P ### Defaults and Preferences -Reader stores __defaults__ - settings which are independent of _fileId_ (ie. independent of the book currently open) - and __preferences__ - _fileId_-dependent (ie. different for every book) - on the server. Defaults are not shared between renderers, ie. the CBR renderer does not share defaults with the EPUB renderer. Defaults and preferences are removed from the server when the associated book or user is deleted. +Reader stores __defaults__ - settings which are independent of _fileId_ (ie. independent of the book currently open) - and __preferences__ - _fileId_-dependent (ie. different for every book) - on the server. Defaults are not shared between renderers, ie. the CBR renderer does not share defaults with the EPUB or PDF renderer. Defaults and preferences are removed from the server when the associated book or user is deleted. ### Annotations and Bookmarks @@ -75,6 +81,14 @@ Search on small-screen device|![Search on small-screen device][SS07] As close to full-screen as you can get on iOS|![As close to full-screen as you can get on iOS][SS08] Android supports true fullscreen (as do most other systems)|![Android supports true fullscreen (as do most other systems)][SS09] +### PDF +| | | +---|--- +Reader showing PDF Reference document in spread mode (pages side by side)|![Reader showing PDF Reference document in spread mode (pages side by side)][SS20] +Search through a document, showing all results in the sidebar|![Search through a document, showing all results in the sidebar][SS19] +Dropdown showing page format options - spread, single page, page width and zoom options|![Dropdown showing page format options - spread, single page, page width and zoom options][SS21] +Reader showing PDF in spread mode, thumbnails in the sidebar|![Reader showing PDF in spread mode, thumbnails in the sidebar][SS22] + ### CBR/CBZ | | | @@ -95,6 +109,7 @@ The same Android device showing a zoomed-in part of a page|![The same Android de [Epub]: http://idpf.org/epub [CBR and CBZ]: https://wiki.mobileread.com/wiki/CBR_and_CBZ [balaclark]: https://github.com/balaclark/HTML5-Comic-Book-Reader + [pdf.js]: https://github.com/mozilla/pdf.js [SS01]: https://raw.githubusercontent.com/Yetangitu/owncloud-apps/master/screenshots/files_reader-1.png "Reader showing day/nighyt mode" [SS02]: https://raw.githubusercontent.com/Yetangitu/owncloud-apps/master/screenshots/files_reader-3.png "Single page full screen on a small-screen device" [SS03]: https://raw.githubusercontent.com/Yetangitu/owncloud-apps/master/screenshots/photo_2017-03-15_17-21-39.jpg "Day mode color selector" @@ -113,3 +128,9 @@ The same Android device showing a zoomed-in part of a page|![The same Android de [SS16]: https://github.com/Yetangitu/owncloud-apps/blob/master/screenshots/photo_2017-03-15_17-22-10.jpg?raw=true "Same page, zoomed in" [SS17]: https://github.com/Yetangitu/owncloud-apps/blob/master/screenshots/photo_2017-03-15_18-28-54.jpg?raw=true "Small-screen, low memory (Android) device showing full-page book cover" [SS18]: https://github.com/Yetangitu/owncloud-apps/blob/master/screenshots/photo_2017-03-15_18-28-56.jpg?raw=true "The same Android device showing a zoomed-in part of a page" + [SS19]: https://github.com/Yetangitu/owncloud-apps/blob/master/screenshots/files_reader_PDF_001.png?raw=true "Search through a document, showing all results in the sidebar" + [SS20]: https://github.com/Yetangitu/owncloud-apps/blob/master/screenshots/files_reader_PDF_002.png?raw=true "Reader showing PDF Reference document in spread mode (pages side by side)" + [SS21]: https://github.com/Yetangitu/owncloud-apps/blob/master/screenshots/files_reader_PDF_005.png?raw=true "Dropdown showing page format options - spread, single page, page width and zoom options" + [SS22]: https://github.com/Yetangitu/owncloud-apps/blob/master/screenshots/files_reader_PDF_006.png?raw=true "Reader showing PDF in spread mode, thumbnails in the sidebar" + + diff --git a/files_reader/appinfo/info.xml b/files_reader/appinfo/info.xml index c2006e4..77a3556 100644 --- a/files_reader/appinfo/info.xml +++ b/files_reader/appinfo/info.xml @@ -5,28 +5,32 @@ Files_Reader A multi-format browser-based ebook reader, supports EPUB and CBR/CBZ - - 1.0.1 + 1.1 AGPL Frank de Lange @@ -140,8 +159,8 @@ The same Android device showing a zoomed-in part of a page|![The same Android de - - + + pgsql sqlite mysql diff --git a/files_reader/js/ready.js b/files_reader/js/ready.js index 7237189..1efb08e 100644 --- a/files_reader/js/ready.js +++ b/files_reader/js/ready.js @@ -25,6 +25,8 @@ document.onreadystatechange = function () { options.session.basePath = $session.data('basepath'); options.session.downloadLink = $session.data('downloadlink'); + console.log(options.session.basePath); + /* functions return jquery promises */ options.session.getPreference = function(name) { @@ -142,6 +144,7 @@ document.onreadystatechange = function () { // start pdf.js renderer function renderPdf(file, options) { PDFJS.filePath = "vendor/pdfjs/"; + PDFJS.imageResourcesPath = "vendor/pdfjs/css/images/"; PDFJS.workerSrc = options.session.basePath + 'vendor/pdfjs/lib/pdf.worker.js'; var reader = pdfReader(file, options); diff --git a/files_reader/templates/cbreader.php b/files_reader/templates/cbreader.php index 7d8b69d..c3c27ff 100644 --- a/files_reader/templates/cbreader.php +++ b/files_reader/templates/cbreader.php @@ -28,7 +28,7 @@ ?> -' data-scope='' data-cursor='' data-defaults='' data-preferences='' data-metadata='' data-annotations=''> + diff --git a/files_reader/templates/epubreader.php b/files_reader/templates/epubreader.php index f2ff51f..16032e7 100644 --- a/files_reader/templates/epubreader.php +++ b/files_reader/templates/epubreader.php @@ -28,7 +28,7 @@ ?> -' data-scope='' data-cursor='' data-defaults='' data-preferences='' data-metadata='' data-annotations=''> + diff --git a/files_reader/templates/pdfreader.php b/files_reader/templates/pdfreader.php index 49d5748..39791d9 100644 --- a/files_reader/templates/pdfreader.php +++ b/files_reader/templates/pdfreader.php @@ -28,7 +28,7 @@ ?> -' data-scope='' data-cursor='' data-defaults='' data-preferences='' data-metadata='' data-annotations=''> + @@ -40,14 +40,17 @@ - + + + + @@ -57,6 +60,9 @@ + + + @@ -87,7 +93,9 @@ +
@@ -119,6 +127,7 @@
+
-
- font -
-
- - - -
-
- - - % -
-
- - - -
-
-
- Et nos esse veri viri scire volemus -
-
-
-
+
display -
- page width -
- maximum characters -
-
- - -
-
-
- - -
-
-
+ +
+
+ +
+