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

Make an stand alone windows epub3 reader( supports MathML) #323

Closed
wzhsunn opened this issue Apr 21, 2015 · 11 comments
Closed

Make an stand alone windows epub3 reader( supports MathML) #323

wzhsunn opened this issue Apr 21, 2015 · 11 comments

Comments

@wzhsunn
Copy link

wzhsunn commented Apr 21, 2015

I want to make a windows epub3 reader.
I found CEF + readium-js-viewer is a more better choice, because cef is simple and smaller than node-webkit .
But CEF dose not supprt chrome app(is it?).
How to build a custom readium-js-viewer , so that it adapt to cef that can open epub books just like a windows native app ?

Thank you !

@danielweck
Copy link
Member

Have you considered Apache Cordova? There's an existing feature branch in the Readium repository ( https://github.com/readium/readium-js-viewer/tree/feature/ApacheCordova ) that explores how to "port" the cloud reader to a native app for Windows 8 and Windows Phone 8, but bear in mind that this is a simple experiment that does not include a "proper" ebook library (just like the cloud reader: there is a static list of pre-loaded EPUBs, but no possibility to add new ebooks). You would have to write additional code in order to support read/write ebook storage, like in the Chrome app/extension.
I hope this helps. Daniel

PS: as this is not a specific bug against the readium-js-viewer codebase, please allow me to close the issue. Feel free to re-open it if you wish to, or to open a new / more specific bug report. The discussion thread is still open, so feel free to comment further :)

@wzhsunn
Copy link
Author

wzhsunn commented Apr 21, 2015

Yes, It's very helpful.
Thank you for your reply !
I want the epub (epub3 supported special mathml ) reader works on win7 desktop and it can add books. Maybe it is like ibooks on mac .
any better idea :).
Thank you !

@danielweck
Copy link
Member

There's a ReadiumSDK -based app "launcher" available in this branch:
https://github.com/readium/SDKLauncher-Windows/tree/feature/feature_revised_launcher
... but this is work-in-progress, the code is native C++ (not managed .NET C#, VB# etc.), and the basic user interface is implemented in MFC (not WinForms or WPF).

If you want to stick to ReadiumJS (no native code, pure HTML + CSS + Javascript), then your best option is indeed a WebView host, such as CEF, etc. (I don't think Cordova supports Windows 7 classic desktop, only "modern" Windows 8+ touch-oriented apps). At any rate, you would need to implement the read/write storage backend specifically for your target platform (there are file size restrictions with web storage such as IndexedDB, so I would recommend using a platform-specific service). With Apache Cordova you can write an interface between the Javascript and the native runtimes, for example to bind the "add ebook" command to platform-specific filesystem access. Let us know how you get on!

@wzhsunn
Copy link
Author

wzhsunn commented Apr 22, 2015

I do not want to stick to ReadiumJS.
But I want a webkit-base render and make a windows 7 epbu3 reader, supports mathml.
Is SDKLauncher-windows a better choice ?
Is it support cef as render ( I do not like IE as render) ?

:)

@danielweck
Copy link
Member

Note that the C++ ReadiumSDK has different licensing terms than the Javascript source code (aka ReadiumJS). I believe that there is a member of the Readium Foundation (Learning Ally) who built a ReadiumSDK application for Windows desktop, using a Chromium shell instead of a IE WebView.

You can also use ReadiumJS inside CEF (or other Chromium / WebKit / Blink shell) but we do not have a working example. Let us know if you succeed :)

@wzhsunn
Copy link
Author

wzhsunn commented Apr 23, 2015

OK ,Thank you.
I will try it .
I think ReadiumJS is more convenient , but it dose not support add books.
ReadiumSDK is more faster, but it dose not support MathML.
Also the licence is notable .
:)

@danielweck
Copy link
Member

Just to clarify: ReadiumSDK-based apps do support MathML rendering (via MathJax, just as any other Readium app). However, the current Windows launcher (written in C++, MFC user interface, IE / Trident web browser control) is behind the other platforms due to the lack of developers time, so MathJax is currently missing.

@wzhsunn
Copy link
Author

wzhsunn commented Apr 23, 2015

If I want to do an support MathML rendering via MathJax with SDKLancher-Windows ,
is there some documents for what should I do ?
Also some documents what I can make a replace IE/Trident for CEF/Webkit(I have build an CEF recently on version 2272 and it has clear API ) .
Or may you give me some suggests?
Thank you so much !
:)

@danielweck
Copy link
Member

SDKLauncher-Windows is still in early development stages, in a feature branch: https://github.com/readium/SDKLauncher-Windows/tree/feature/feature_revised_launcher

Here are useful pointers to see how MathJax gets "injected" into EPUB3 HTML documents:

Script to inject in html>head>script@src
https://github.com/readium/SDKLauncher-OSX/tree/develop/LauncherOSX/ReaderScripts/mathjax

Where the script reference is injected:
https://github.com/readium/SDKLauncher-OSX/blob/develop/LauncherOSX/PackageResourceServer.mm#L188

Where the actual script is supplied:
https://github.com/readium/SDKLauncher-OSX/blob/develop/LauncherOSX/LOXWebViewController.mm#L112

@wzhsunn
Copy link
Author

wzhsunn commented Apr 23, 2015

Very useful .
I will make a try.
Thank you very much!
:)

@danielweck
Copy link
Member

Cross-reference: https://github.com/readium/SDKLauncher-Windows/issues/8
(actual "support MathML" issue)

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

2 participants