Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2014, 11:39 AM   #1
fdeandao
Junior Member
fdeandao began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2014
Device: Readium
Ibooks, Epub3 and fixed layout overflow?

I want to create a epub and display in Ibooks, this epub have a fixed layout but is dynamically generated, the result may have varying dimensions, but in ibooks needs a viewport with static width and height, for example:

Code:
<meta content="width=768, height=576" name="viewport"/>
Ibooks only show the content shown in the viewport

Also, some page have dynamic content and this can grow the size

i tried device-height or 100% and didn't work

Right now i put all content of the page in a DIV with this style:

Code:
body > nav > ol {
          width: 90%;
          margin-left: 2%;
          margin-right: 2%;
}
 
 
.epub_content, body > nav {
          width: 740px;
          max-width: 740px;
          min-width: 740px;
          height: 536px;
          max-height: 536px;
          -webkit-overflow-scrolling: touch;
          overflow-x: hidden;
          overflow-y: auto;
          padding: 8px 0px;
}
 
 
.exp_resource {
          max-width: 740px;
          overflow: hidden;
}
 
 
.window_container {
          width: 770px;
          max-width: 770px;
          min-width: 770px;
          height: 545px;
          max-height: 545px;
          -webkit-overflow-scrolling: touch;
          overflow-x: hidden;
          overflow-y: auto;
}
This work fine and i can see all content but anchors didnt works

Anyone know how to make scrollable page in epub with fixed layout?

Regards
fdeandao is offline   Reply With Quote
Old 05-14-2014, 01:51 PM   #2
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
I didn't really understand the first part of what you're trying to do but regarding this part:
Quote:
Anyone know how to make scrollable page in epub with fixed layout?
That's pretty simple, all you have to do is this:

1. Add a div with class "test" to your html page
Quote:
<div class="test">
2. Add paragraphs to that div:
Quote:
<p>Lorem ipsum dolor sit amet, vero utamur intellegat vel an, movet habemus ut quo. Corpora accusamus pro an, cu inani dicant dolorum cum. Mei eu vitae vocibus facilis. Nam affert evertitur vituperatoribus te. Eum laboramus concludaturque id. In per facilis fastidii philosophia, solet imperdiet dissentiunt ne his.
</p>
<p>
Quot contentiones ex eam. Sed at augue noster assueverit, te mea omnium alienum commune, usu ipsum voluptaria mnesarchum te. Vix ad novum deserunt philosophia, aliquando persecuti adolescens vix ea, nam te putent constituto. Aliquam contentiones sed at. Ut dolorum delicata eum. Justo idque te his, ei mel malis delenit definitiones, perpetua intellegam ei vix.
</p>
3. Add style for "test" class in your stylesheet (style.css):
Quote:
.test
{
height:300px;
width:300px;
overflow-y:auto;
overflow-x:hidden;
}
You can even style the scrollbar if you like using CSS, e.g.
Quote:
::-webkit-scrollbar {
width: 12px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}

::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
However, bare in mind that this probably only works for the iPad :P

I attached a file with this working, disregard the rest, I just took some fixed layout ePub I had and added your part.
What you need is located in p01.xhtml and style.css
Attached Files
File Type: epub test.epub (999.1 KB, 286 views)

Last edited by odedta; 05-14-2014 at 01:53 PM.
odedta is offline   Reply With Quote
Advert
Old 05-14-2014, 03:04 PM   #3
fdeandao
Junior Member
fdeandao began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2014
Device: Readium
i did something similar but links from navigation doesn't works in page with scrollbar, i attach and example
Attached Files
File Type: epub example.epub (97.5 KB, 236 views)
fdeandao is offline   Reply With Quote
Old 05-14-2014, 05:30 PM   #4
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Well, I took this as a challenge and for the past 2 hours or so I tried every possible javascript event I could find to get it to scroll after the page turned.

I have no idea why it's not working, I have a hunch it's not possible in ePub.

I have basically created a button with onlick event to fire this:
Quote:
window.location = "p02.xhtml#test";
This works perfect in Calibre by the way, for some reason when you view the ePub in iBooks in fixed layout mode this only seems to redirect you to the page in question but not take you to the id.

There might be some iBooks or ePub quirk to get this right, hopefully someone will post it here. :/

This feels a lot like the iPad1 (iBooks 5.1.1) problem with links, it goes to the page but does not focus you on the anchor.

Last edited by odedta; 05-14-2014 at 05:34 PM.
odedta is offline   Reply With Quote
Old 05-14-2014, 05:43 PM   #5
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Oh, just incase you're looking for the full code I attached the file I was testing on.

You should use Calibre's Check Book function, there are a lot of errors in the file you uploaded.
Attached Files
File Type: epub example2.epub (388.5 KB, 263 views)
odedta is offline   Reply With Quote
Advert
Old 05-15-2014, 11:30 PM   #6
fdeandao
Junior Member
fdeandao began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2014
Device: Readium
Sorry for my english

Thanks, you've helped me a lot, let me check the epub

I will research more about this problem

I'll post if I find something

Regards
fdeandao is offline   Reply With Quote
Reply

Tags
epub, fixed_layout, ibooks


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with fixed layout epub 3 and iBooks version 2 verydeepwater ePub 10 04-22-2014 05:11 PM
fixed layout text display on iBooks rnuss ePub 3 03-24-2014 06:26 AM
Start page on fixed layout epub3 brunobruno ePub 12 03-30-2013 01:50 AM
Creating Fixed Layout ePub3 from InDesign flipick ePub 12 03-14-2013 09:22 AM
epub3 Sigil Poetry(fixed layout) Giggleton Sigil 7 04-04-2011 12:58 PM


All times are GMT -4. The time now is 01:55 PM.


MobileRead.com is a privately owned, operated and funded community.