Git Product home page Git Product logo

aepubreader's Introduction

aepubreader's People

Contributors

andrejkolar avatar fedefrappi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aepubreader's Issues

page oriantation changed screen fitting problem

Hi,
Thanks for library. When orientation changed from landscape to or opposite of that, screen not fitting content. When page changed to next page, it fixes itself. I put screenshots as attachment.
image1
image2

Application crash after loading file

Terminating app due to uncaught exception

'NSInternalInconsistencyException',

reason: 'Unsupported action method signature. Must return MPRemoteCommandHandlerStatus or take a completion handler as the second argument.'

Parsing OPF File

Sir,
Here i have the doubt in parsing the epub file,the file listout all chapters with out any problem but if the file contains the subchapters how i list out could u help me sir. Its one of my big problem in parsing the contents of the epub file

For Sample refer the ncx file contains similar formats:
1]Historical Notes - Table of Contents
2]Florence

Form the [1] its take the title but in the [2] its not taken,how i rectify it

this class is not key value coding-compliant for the key ..

I am using a url to download an epub and then when i use epubreader to display it ...it crashes with message .....this class is not key value coding-compliant for the key public@vhost@g@gutenberg@html@files@41409@[email protected].'
It crashes in - (void) parseOPF:(NSString*)opfPath method.

Please reply soon if anyone has solution for it.

How to Set the Frame for video

Here in my epub i have the video files but its not aligned in my webview, how could be aligned kindly help me.either we need to set viewport or css,it means how can i set these styles

How to find the image width and height?

I found another problem that is, i'm using the code

[NSString stringWithFormat:@"addCSSRule('img', 'max-width: %fpx; height: %fpx;')", self.webView.frame.size.width_0.75,self.webView.frame.size.height_0.75];
[webView stringByEvaluatingJavaScriptFromString:setImageRule];

to avoid image getting cut. Now image getting cut problem is solved. But the only problem is, if the image is too small(400*200) means image getting stretch(with that code). Please guide me to solve that.

I'm really struggle with this problem..How can i check the image size based on that i will try to change this code

[NSStringstringWithFormat:@"addCSSRule('img', 'max-width: %fpx; height: %fpx;')", self.webView.frame.size.width_0.75,self.webView.frame.size.height_0.75]; [webViewstringByEvaluatingJavaScriptFromString:setImageRule];

for set webView width and height...

There are different size of images. so only it's getting stretch or shrink when aligning the image to fit in a webview.

Now i need to find image width and height which is used in picture book(.ePub) . Then only i can able to fit the image with original size of image in webview.

Please anyone guide me to do this

Thank you

Search not working

Hi,

Could explain me how can i make search work? On the original code it works fine. But i moved the searchBar and put it inside a UIPopoverController. This popover calls SearchResultsViewController. For some reason, this code never returns anything after this change:

NSString* foundHits = [webView stringByEvaluatingJavaScriptFromString:@"results"];

Any tips?

License

What is the AePubReader's license?

Thanks
Larry

Font size not increasing for .xhtml pages..

I am using other .epub files in this code but increase/decrease in font size is working only with sample file (i.e. vhugo.epub) provided by you. this file is unzipping in .xml format while the books i m using unzipping the page in .xhtml format and font changes are not working for these format . Please give some guidance why its happening !

Cover page

its strange how the cover page is some how loaded from cash ,

i mean when i open the first epub the first page is right , when i dismiss the reader and open it another time with diff epub , the cover page still the same but the pages are all right

pagination issue

i am trying to load an epub file in chapter wise into the webview. I want to know the width of the screen.

For Example:

if the content have one and half page text means it returns the width to be as 768
but
if the content have two full page text means it returns the width to be as 1536

my code is:

int totalWidth = [[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.scrollWidth"] intValue];

please help me.....

Commercial use

Good Day,

Can you please give us permission to use your code in our reader for commercial used?

Thanks very much
Willie

Page Curl

Is there an option for page curl, instead of slide?

Thank you.

Number Sign "#" replaced by "%23"

Hi @fedefrappi i just wanna ask why is my url "Text/Cover.html#cover1" changed to this "Text/Cover.html%23cover1"? I got error that says this url is not found.. Please Help me im having a hard time on this. Thanks

Image getting cut in epub picture book

Hi All,

If .epub files having image means(picture book) it's getting cut and the remaining image shown in another page..

How to resolve this issue?

Thank You

Cross links in AePubReader

Hi all,
first thanks to author for nice free code!
I'm using it.

If it correct that this code no supply href to another xml file (<'a href='section-0801.xml'>Look Here<'/a>).

How to do it? Any idea?
Thank you.

Landscape Page

Hi sir,
Further ibook development i am using this engine for portrait its perfectly working thanks for this engine, how can i imaplement the landscape mode, could help me i am totally strucked in this part,

2 page display

Is there a way on how i can make it display on two page on landscape orientation?

Thank you very much!

Working with ARC

Could anyone help me to convert this thing into ARC compatible.
Since i need to use this functionality in ARC.

pagesInCurrentSpineCount is not correct sometimes.

When the app load the epub file first time and the app load the chapter 5(or other chapters) at the first time, sometimes it get the wrong pagesInCurrentSpineCount(this is wrong : totalWidtht == webView.bounds.size.width, pagesInCurrentSpineCount == 1), the pagesInCurrentSpineCount is wrong.

Epub

Search keyword don't redirect to the specified page when 1st line of the 2nd page in a chapter is searched

Book marks and some issue fixed

Hi , Thanks your epub reader ,Can you release book marks function ??

I use your sample to read epub in my iphone project

and I change some code for read more different epub books

  1. EPub.m

In this method is use to find NCX file path , I ONLY use this discriminant to search NCX

  • (void) parseOPF:(NSString*)opfPath{
    :
    :
    if([[[element attributeForName:@"id"] stringValue] isEqualToString:@"ncx"]){
    ncxFileName = [[element attributeForName:@"href"] stringValue];
    }

}
And remark others if statement , works fine so far .

  1. EPubViewController.m

The picture books need add more CSS rule

  • (void)webViewDidFinishLoad:(UIWebView *)theWebView
    :
    :
    :
    NSString *setImageRule = [NSString stringWithFormat:@"addCSSRule('img', 'max-width: %fpx; height:auto;')", webView.frame.size.width *0.75];

[webView stringByEvaluatingJavaScriptFromString:setImageRule];

3.Add page curl

actually I use some tricky step to implement page curl effect

In EPubViewController.h add < UIGestureRecognizerDelegate >

In EPubViewController.m

  • (void)viewWillAppear:(BOOL)animated
    :
    :
    UISwipeGestureRecognizer* rightSwipeRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(gotoNextPage)] autorelease];
    [rightSwipeRecognizer setDirection:UISwipeGestureRecognizerDirectionLeft];

    UISwipeGestureRecognizer* leftSwipeRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(gotoPrevPage)] autorelease];
    [leftSwipeRecognizer setDirection:UISwipeGestureRecognizerDirectionRight];
    //tap to show/hide tool bar
    UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
    tapRecognizer.delegate = self;
    tapRecognizer.numberOfTapsRequired = 2;
    [webView addGestureRecognizer:tapRecognizer];
    [webView addGestureRecognizer:rightSwipeRecognizer];
    [webView addGestureRecognizer:leftSwipeRecognizer];
    :
    :
    And change these method

  • (void) gotoNextSpine {
    if(!paginating){
    if(currentSpineIndex+1<[loadedEpub.spineArray count]){
    [self loadSpine:++currentSpineIndex atPageIndex:0];
    CATransition *transition = [CATransition animation];
    [transition setDelegate:self];
    [transition setDuration:0.5f];
    [transition setType:@"pageCurl"];
    [transition setSubtype:@"fromRight"];
    [self.webView.layer addAnimation:transition forKey:@"CurlAnim"];
    }
    }
    }

  • (void) gotoNextPage {
    if(!paginating){
    if(currentPageInSpineIndex+1<pagesInCurrentSpineCount){
    [self gotoPageInCurrentSpine:++currentPageInSpineIndex];
    CATransition *transition = [CATransition animation];
    [transition setDelegate:self];
    [transition setDuration:0.5f];
    [transition setType:@"pageCurl"];
    [transition setSubtype:@"fromRight"];
    [self.webView.layer addAnimation:transition forKey:@"CurlAnim"];
    }
    else {
    [self gotoNextSpine];
    }
    }
    }

  • (void) gotoPrevPage {
    if (!paginating) {
    if(currentPageInSpineIndex-1>=0){
    [self gotoPageInCurrentSpine:--currentPageInSpineIndex];
    CATransition *transition = [CATransition animation];
    [transition setDelegate:self];
    [transition setDuration:0.5f];
    [transition setType:@"pageUnCurl"];
    [transition setSubtype:@"fromRight"];
    [self.webView.layer addAnimation:transition forKey:@"UnCurlAnim"];
    } else {
    if(currentSpineIndex!=0){
    CATransition *transition = [CATransition animation];
    [transition setDelegate:self];
    [transition setDuration:0.5f];
    [transition setType:@"pageUnCurl"];
    [transition setSubtype:@"fromRight"];
    [self.webView.layer addAnimation:transition forKey:@"UnCurlAnim"];
    int targetPage = [[loadedEpub.spineArray objectAtIndex:(currentSpineIndex-1)] pageCount];
    [self loadSpine:--currentSpineIndex atPageIndex:targetPage-1];
    }
    }
    }
    }

Now it will have a page curl effect when you swipe your finger on screen.

Arabic Content

Why does it take more time to load an arabic epub .. ?
what should i change in the epub file to maintain the same speed as english content ? is there some default font or some sort of settings ??????

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.