readium / sdklauncher-ios Goto Github PK
View Code? Open in Web Editor NEWA small iOS application to serve as a launcher/testbed for the Readium SDK.
License: BSD 3-Clause "New" or "Revised" License
A small iOS application to serve as a launcher/testbed for the Readium SDK.
License: BSD 3-Clause "New" or "Revised" License
...because the file://
URI scheme / protocol cannot be used anymore for serving reader.html
from the app-bundle (alongside HTTP://IP:PORT
for serving the EPUB content documents). This also means that using different origins will bi-bidirectionally sandbox the iframe, preventing the Readium rendering engine (readium-shared-js) to perform some behaviour injection such as Media Overlays playback, annotations, etc.
See:
https://docs.google.com/document/d/1GK1aVsrTv23WroBWMX-XiwYtXbq6huW_pK8QXRaY6XQ/
Note that window.top / parent / frameElement.ownerDocument.defaultView
cannot reliably be used to plug the security holes, so we removed them from the cloud reader and chrome extension.
SDK can not open attacked file , is there anyone have solution??
Here is the link of ePub file:
/Users/ganeshkulpe/Library/Developer/Xcode/DerivedData/EbookReader_RediumSdk-hhpiwicxssxtegbbrdqarbwmvwku/Build/Intermediates/ePub3.build/Debug-iphonesimulator/ePub3-iOS.build/Script-AB5D1071172AD540001D3C95.sh: line 2: cd: /Users/ganeshkulpe/Desktop/Ebook: No such file or directory
MakeHeaders.sh: line 23: local: can only be used in a function
mkdir: : No such file or directory
MakeHeaders.sh: line 26: typeset: -A: invalid option
typeset: usage: typeset [-afFirtx] [-p] name[=value] ...
ls: ePub3/ThirdParty/utf8-cpp/include/: No such file or directory
ls: ePub3/ThirdParty/google-url/base/.h: No such file or directory
ls: ePub3/ThirdParty/google-url/src/.h: No such file or directory
ls: ePub3/ThirdParty/libzip/.h: No such file or directory
ls: ePub3/xml//.h: No such file or directory
MakeHeaders.sh: line 30: ePub3/xml: division by 0 (error token is "l")
ls: ePub3/utilities/.h: No such file or directory
ls: ePub3/utilities/.inl: No such file or directory
MakeHeaders.sh: line 31: ePub3/utilities: division by 0 (error token is "s")
ls: ePub3/.h: No such file or directory
MakeHeaders.sh: line 46: ${(k)groups}: bad substitution
I have download your SDKLauncher-iOS sample code .After adding ePub3.xcodeproj , i am getting above error.
I have follow this step:-
Drag and drop the readium project inside your xcode project, the xcode project is located in :
Add the readium static library to the link Binary with libraries :
libePub3-iOS.a
Update your Header Search Path :
${SDKROOT}/usr/include/libxml2
+readium-sdk/ePub3 (choose recursive)
Wating for your reply
Thanks in advance
Reported by Bogdan
Video demonstration:
https://www.dropbox.com/s/uv78dnf56jm8ftm/landscape_zoom_problem.mov
It may be that this problem can/must be solved in readium-shared-js, by ensuring that the viewport cannot be zoomed-in (HTML head meta content):
width=device-width
user-scalable=no
initial-scale=1
minimum-scale=1
maximum-scale=1
(not sure, needs testing)
Hi @danielweck ,
I am using readium sdk to make an iOS demo for my client. I am able to many of required things like, I made able to load page horizontally with pagination effect. I also did lazy loading of pages. I actually loaded more then one webviews and loaded required previous and next pages simultaneously. Everything is working according to my requirements but when epub loads for the first time it takes much time to load current, few previous and few next pages at the same time.
What I understand is I am using this code https://cloudup.com/ceXpYNmeShO to load a book in a single webview and opens the required page. This approach is taking much time because I am using "ReadiumSDK.reader.openBook" method.
I want to load only one page in a webview (I dont want it to swipe to load next or previous pages because I manage more webviews to load other pages). I think that will reduce the page loading time. I look the documentation here https://dl.dropboxusercontent.com/u/18642964/Readium/Shared-JS%20JSDoc/ReadiumSDK.Views.ReaderView.html and I hope following methods can help me in loading single page instead of entire book
I do not find any test code to use these methods. I hope you understand my need, can you please let me know how I can use these methods or any other to load only single page contents/resources in a webview to reduce loading time for a single webview?
Thanks and waiting on your response.
Regards,
Dilawer Hussain
From Tom Feldman:
Hi all,
I'm wondering if there is an api somewhere in the readium-shared-js or maybe even some standard javascript I can execute to know when javascript is done figuring out its paging routine. I was previously under the impression that a call to ReadiumSDK.reader.openPageNext() would result in a single callback request of pageDidChange when it was finished. If the spine item changes however, this callback is being requested more than once.
Here's a log of the requests:
2015-03-24 10:44:48.837 SDKLauncher-iOS[2135:209217] Request: file:///private/var/mobile/Containers/Bundle/Application/09A8C37D-532B-43BE-A752-EABE857331CB/SDKLauncher-iOS.app/reader.html
2015-03-24 10:44:49.114 SDKLauncher-iOS[2135:209217] Request: epubobjc:readerDidInitialize
2015-03-24 10:44:49.130 SDKLauncher-iOS[2135:209217] Request: about:blank
2015-03-24 10:44:49.210 SDKLauncher-iOS[2135:209217] Request: epubobjc:settingsDidApply
2015-03-24 10:44:49.233 SDKLauncher-iOS[2135:209217] Request: about:blank
2015-03-24 10:44:49.254 SDKLauncher-iOS[2135:209217] Request: http://127.0.0.1:55661/spi-ad.xhtml
2015-03-24 10:44:49.490 SDKLauncher-iOS[2135:209217] Request: epubobjc:pageDidChange?q={"isRightToLeft":false,"isFixedLayout":false,"spineItemCount":22,"openPages":[{"spineItemPageIndex":0,"spineItemPageCount":1,"idref":"spi_ad","spineItemIndex":1}],"canGoLeft_":false,"canGoRight_":true}
2015-03-24 10:44:54.911 SDKLauncher-iOS[2135:209217] Running open next script
2015-03-24 10:44:54.931 SDKLauncher-iOS[2135:209217] Request: about:blank
2015-03-24 10:44:54.937 SDKLauncher-iOS[2135:209217] Ran open next script
2015-03-24 10:44:54.965 SDKLauncher-iOS[2135:209217] Request: epubobjc:pageDidChange?q={"isRightToLeft":false,"isFixedLayout":false,"spineItemCount":22,"openPages":[{"spineItemPageIndex":0,"spineItemPageCount":1,"idref":"spi_ad","spineItemIndex":1}],"canGoLeft_":false,"canGoRight_":true}
2015-03-24 10:44:55.004 SDKLauncher-iOS[2135:209217] Request: http://127.0.0.1:55661/index.xhtml
2015-03-24 10:44:55.230 SDKLauncher-iOS[2135:209217] Request: epubobjc:pageDidChange?q={"isRightToLeft":false,"isFixedLayout":false,"spineItemCount":22,"openPages":[{"spineItemPageIndex":0,"spineItemPageCount":1,"idref":"id-id2442754","spineItemIndex":2}],"canGoLeft_":true,"canGoRight_":true}
You'll notice one call to the open next script and two pageDidChange events.
Hey guys,
I'm trying to find any examples with Readium that launch encrypted epub files. Is there a specific process for encrypting epubs to work with Readium? And are there any specific settings that need to be specified in the SDK to decrypt said epubs?
It seems web audio API is supported based on tone played by this epub after speaking text:
https://dl.dropboxusercontent.com/u/39156804/synthesis.epub
However, on the below epub, which works on iBooks on IO7, when you click "sonify" on the SVG graphic on page 5 does not generate a tone via Readium:
Need to be able to load an EPUB which fetches the version information and displays it.
I've got an error trying to build the lib :
readium-sdk/ePub3/ePub/property_holder.cpp:227:16: No viable conversion from 'bool' to 'PropertyPtr' (aka 'shared_ptrePub3::Property')
I'm guessing the latest compiler with the latest version of Xcode doesn't like that.
When using the continuous scroll mode, we are having issues where the scrolling is inconsistent and the page seems to blink and scroll unexpectedly.
We have filmed our iPad (iPad Air 2) to demonstrate the problem, you can see the video here:
http://bayard.tobostudio.com/video/readium.mp4
In this video we load the Moby Dick ePub included as an example in this repository. We have seen the same issues with our own ePubs.
I have tried both the develop branch and the wkwebview feature branch but they both seem to yield comparable results.
Does anyone have suggestions on what should be done to improve this reading mode?
Regards,
Thomas
2015-03-10 20:17:04.971 SDKLauncher-iOS[6026:61ab] The resource content length is zero! images/CloseX-31.png
epub file :
https://github.com/IDPF/epub3-samples/tree/master/30/linear-algebra/EPUB
Hi all.
I'm writing an iOS application using the Readium SDK and associated JS/HTML/CSS and I started having issues with memory pressure. It seems like each time readium loads a new spine item into the UIWebView there is a growth in WebCore purgeable data that is never "purged". Sending low memory warnings does nothing to recover this memory. So I decided to try this on the SDKLauncher-iOS itself to determine if it was possibly something I was doing wrong but the issue exists on the SDKLauncher as well. When running on a device, memory pressure will eventually begin sending low memory warning to the application and then finally the application will crash with a memory error.
You can actually reproduce this issue with any of the supplied epubs with multiple spine items however the Accessible ePub3 book makes the issue more dramatic.
Test suite is located at http://www.epubtest.org/. Need to test the candidate build and log the results on the website.
Originally posted by @vanisuthamathi
at:
readium/readium-js#58
Application terminates with the memory warning error
This is works fine in Android devices and chrome browsers. This crashes only in the ios devices. I have tried with both develop and release0.14 readium versions. Any suggestions you can provide for cleaning up the memory/Turning off the events before increasing the font size.
Hi,
We have tried to make an IOS version of the Readium reader of the feature branch, unfortunatly
we get the following error
Undefined symbols for architecture arm64:
"_epub_sys_cache_flush", referenced from:
ePub3::ByteBuffer::Clean(unsigned char*, unsigned long) in libePub3-iOS.a(byte_buffer.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
it works on a ipad 3/ios8, ipad 2/ios7
Hi,
On the master branch :
I manage to run the readium SDK inside a non-arc project without any problem.
I tried running it inside a ARC enabled project, i add a -fno-objc-arc flag to all the readium classes but it crashes in RDPackage when opening an epub :
RDPackage.mm:149
ArchiveReader* ReaderForRelativePath(const string& path) const { return _archive->ReaderAtPath((_pathBase + path).stl_str()); }
Do you have any idea how i can run the ReadiumSDK inside a ARC enabled project ?
Thanks,
Vincent
I am trying to run this project on my iPad (which is running iOS 7.0.3), but I cannot get it to build. I noticed that the "download zip" feature doesn't seem to work, but cloning it seems to get me closer to a buildable project. It always fails with the same error. I have attached a screenshot of the error I am seeing. I have grabbed a couple different releases of this project, and they all fail with the same error. What am I missing to get this to run? Any help would be greatly appreciated. Thank you.
how get ePub3.xcodeproj and libePub3-iOS.a
I debug the code and I am seeing the EpubViewController is rendering dummy reader.html file instead of ePub content which I clicked in the list. How do I render the ePub content in sample application. Please guide me.
Hello. In the iOS project, I am trying to make edits to the popup on text selection. Currently, when text is selected there are options to 'Copy' and 'Define'. I would like to add my own module here, a 'translate'. I have looked through the files and found references in annotations_manage.js and annotations_module.js to getCurrentSelection, addHighlight and addSelectionHighlight. I added some console.log statements here and ran the safari developer web inspector to look for these log statements, and could not find them. Am I looking in the wrong place to make edits to this popup on text selection? I decided to post here after seeing no activity in IRC.
/Users/me/Library/Developer/Xcode/DerivedData/SDKLauncher-iOS-dczrwvltmrpebvazathcjstgewia/Build/Intermediates/SDKLauncher-iOS.build/Debug-iphonesimulator/SDKLauncher-iOS.build/Script-3403517016CEB1B1009E3B88.sh: line 3: tsc: command not found
Command /bin/sh failed with exit code 127
I have epub with embedded video. It works fine if Internet connection present. But if I switch on airplane mode video doesn't present.
Build instructions are here:
https://docs.google.com/a/shape.dk/document/d/1DphaTO2fu7mQoBKalzyfphIlOB2Ncp7yHbIbbti92CE/edit#
There should be a link from the README.
...so that all of the epub-testsuite checks can be ticked.
(reported by Bogdan)
This problem may be due to two-page synthetic spread display only, as it seems to work in single page mode.
Note that SDKLauncher-OSX handles this fine.
Screenshot:
https://www.dropbox.com/s/d3pnwpji7b7s282/last_page_bug.png
I am developing epub reading system in ios, I had already had unzip process and extract in locally such as EPUB/OPS/... to Document folder
I see only option OpenContainer which work only .epub file. It has another ways to provide this.
If one navigates through a RTL book (using the navigation arrows), all is well as long as you don't let the iPad go to sleep. If you do, when the iPad is "re-awoken", the arrows no longer work. Or, more accurately, the current page disappears and is replaced with a blank page.
Verified with both EPUB TestSuite 130 and SmokeTestFXL-RTL
Found on an iPad 5 with iOS 7.x
The EPUB Reading System object needs to be loaded and read at the time of the document load event. This can be tested with SmokeTestFXL in the scripting chapter. If rso-010 passes, this issue can be closed.
When navigating a RTL book (e.g. EPUB TestSuite 130), the page navigation arrows that the bottom of the page go the wrong way, i.e. one must press the arrow pointing to the right in order to navigate to the left.
Test EPUB:
https://code.google.com/p/epub-samples/downloads/detail?name=regime-anticancer-arabic-20130327.epub
Note that Japanese RTL page progression direction with vertical writing mode works fine:
https://code.google.com/p/epub-samples/downloads/detail?name=kusamakura-japanese-vertical-writing-20121124.epub
Suggestion: check this code https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L234
Need to have basic support for MathML. If most of the tests in Chapter 4 of SmokeTestFXL pass, then this issue can be closed.
Non-ASCII characters are rendered wrong, as if UTF-8 file was read as Latin-1.
I can provide a book for testing (by email [email protected]).
The book is displayed correctly Chrome.
Adding <meta charset="UTF-8">
to the reader html file seems to solve the problem though...
Hi,
Building master branch works great, but when i build from the develop branch i get this compiler errors :
_platform.h:159:36: Token is not a valid binary operator in a preprocessor subexpression
Here is my conf :
Xcode Version 4.6
Mac OS X 10.7.5
Here is the full compile log :
In file included from /Volumes/Save/Documents/Projets/Experimentations/SDKLauncher-iOS-develop/readium-sdk/Platform/Apple/../../ePub3/utilities/../_config.h:73:
/Volumes/Save/Documents/Projets/Experimentations/SDKLauncher-iOS-develop/readium-sdk/Platform/Apple/../../ePub3/utilities/../_platform.h:159:36: error: token is not a valid binary operator in a preprocessor subexpression
~~~~~~~~^
/Volumes/Save/Documents/Projets/Experimentations/SDKLauncher-iOS-develop/readium-sdk/Platform/Apple/../../ePub3/utilities/../_platform.h:258:34: error: token is not a valid binary operator in a preprocessor subexpression
^~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Save/Documents/Projets/Experimentations/SDKLauncher-iOS-develop/readium-sdk/Platform/Apple/../../ePub3/utilities/../_platform.h:171:39: note: expanded from macro 'EPUB_ARM_ARCH_AT_LEAST'
2 errors generated.
Hi
I cloned develop branch and used highlight api,but nothing happens.
getCurrentSelectionCfi function returns null,addSelectionHighlight do nothing after select a text.
I used this code in a button click event:
NSString *result = [m_webView stringByEvaluatingJavaScriptFromString:@"ReadiumSDK.reader.getCurrentSelectionCfi()"];
NSLog(@"cfi=%@",result);
[m_webView stringByEvaluatingJavaScriptFromString:@"ReadiumSDK.reader.addSelectionHighlight(124, \"highlight\")"];
Hi,
I'm practicing with Readium SDK, and during my researching, here's something bother me.
Where will Readium read navigation item?
For example, I want to protect my ePub, I encrypt all xhtml files and before Readium load those files, I decrypt it before it loaded. I could decrypt those xhtml files when I need to load some page from spine items of table of content.
The problem is when Readium need to load the epub file, it seems like it need to load the toc.xhtml first, but I don't know where it load the file so I can't decrypt it and I always get the error: "xhtml/toc.xhtml:1: parser error : Start tag expected, '<' not found" and this one: "libc++abi.dylib: terminating with uncaught exception of type ePub3::epub_spec_error: Publications MUST contain exactly one navigation document."
I know that those errors above is because the toc.xhtml is encrypt, so that's why I need to know where Readium load or point to toc.xhtml.
Please help.
Hello,
I am facing a problem. Let me explain it in steps
Attached is the screenshot how it looks in landscape mode.
Goal: I actually want to do the page size to fit the screen, whenever it moves from portrait to landscape or landscape to portrait. Please let me know how and from where I can do this.
Thanks
readium-js-viewer has additional control for pan-zoom (combo box / pull-down list of zoom-fit options + arbitrary percentage value).
This should be achievable in native launchers via touch gestures (pinch / stretch).
Hey guys,
I was wondering if there is any documentation on incorporating the readium-sdk into an existing iOS project? I have a project using cocoapods so what I've done is setup a git submodule for the Readium-sdk and added the xcode project to the workspace. I'm attempting to drop the source code for the launcher app into my own application for a proof of concept but I'm getting a lot of compiler errors from the LocStr() function used throughout the application.
Any help is appreciated.
in an attempt to verify the version being tested, i cannot confirm as there is no about or info page.
Hi there,
We are working and testing the Readium project. We are using the Chrome plugin to test an epub3.
This epub is exported from indesign cc2014 (latest build), it looks perfect in windows/chrome/readium plugin.
we have build our own app for iOs and there are a ton of issues, i hope you can explain and /or help us.
First of all if we leave the TOC generation on in Indesign the ePub crashes, if we switch it to TOC - filename it works.
Most fonts do not look correct on IOS, they do look correctly on the chrome plugin.
We have a Epub 3 file, full of interactive animations made in Adobe Edge, these animations need to go inside the Indesign document,
These animations work in the chrome plugin and in the Gitden IOS reader but do not in the readium IOS versions.
We really want to have a good reader for these complex epub files, please help or steer us in the right directions.
Thanks.
O. Curiere
OCG Studios
[email protected]
Hello.
Is there a way to jump to a specific paragraph within an epub? My end goal is to sync 2 books. When a user highlights a word in book1, I would like to know the paragraph id that this word belongs to. And then I would like to load book2, jumping to the location of the paragraph with the same id.
I see that I can do this on a page by page basis, using each spineItem's spineItemIndex and spineItemPageIndex and initializing/pushing to the navigationController a new EPubViewController. But I would like to narrow in to the paragraph level.
(Just thinking now...perhaps this would require giving each paragraph an id attribute when the epub's are being authored. <p id=1'>.......)
In a reflow document, when attempting to animate the uiwebview during a page transition within the same spine item, I discovered that the page loaded event is sent before the uiwebview visually updates.
Whilst experimenting with animations using javascript, I found a solution that renders the offset change before sending the page load event by animating an opacity change in the document. I'm not certain why it works, or if it's uiwebview specific, but I'm posting it here for further evaluation in the hopes that maybe a cleaner solution can be found.
In reflowable_view.js :
function redraw() {
var offsetVal = -_paginationInfo.pageOffset + "px";
_$epubHtml.css("opacity", "0.01");
if (_htmlBodyIsVerticalWritingMode)
{
_$epubHtml.animate({
top: offsetVal,
opacity: 1
}, 0, function() {
});
}
else
{
var ltr = _htmlBodyIsLTRDirection || _htmlBodyIsLTRWritingMode;
_$epubHtml.animate({
left: ltr ? offsetVal : "",
right: !ltr ? offsetVal : "",
opacity: 1
}, 0, function() {
});
}
showBook(); // as it's no longer hidden by shifting the position
}
On iOS, when the Launcher requests a resource, there is a secondary resource request and the result is that parts of the resource path get double (e.g. Content/Content).
Boris implemented a workaround for this which seems effective, but since we are not certain of the origin of this, this issue is being logged to track it
For example, page-blanche-20130322.epub (a document we talked about the other day) worked fine previously in iOS, but with the latest changes, first a request is made for this relative resource path:
Content/cover.xhtml
...which succeeds. Right after that another resource is requested at this path:
Content/Content/cover.xhtml
This does not occur with each document, only with some, e.g. page-blanche.
...which fails due to the extra parent directory in the path.
In two widget-demos I developed there are scrollable divs into which text is appended with each updated. The result should be a SCROLLABLE div. Instead, the div is not scrollable but instead becomes longer and longer until it extends completely off the bottom of the page - to infinity, apparently.
Will provide link to the EPUB of the widget-demo soon.
i am using test epub "0130 - rtl progression and vertical writing tests"
in the links sections (links-rtl-010 - links-rtl-030) the links no longer open their respective webpages. this used to work correctly but no longer work in build 0.17.2
iPad iOS 7.1.2
Need to support at least the IDPF-blessed obfuscation. Testfile: SmokeTestFXL, Chapter 7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.