php - How could a cms application split content over multiple pages? -


i have idea website involves content being split on multiple pages. similar this:

http://tympanus.net/development/3dbookshowcase/

however, have no idea how work out how split content, aside using monospaced font, working out how many words there per page , diving total number of words page number.

however, i'd use different number of fonts, insert images , diagrams. i'm thinking dynamically finds out widths of each font character , counts each character per page , there works out how split them. that's getting bit bad though.

how word processor know how split pages, , realistically replicated using php or ruby on rails or other server-side language?

in terms of rendering different pages, it's not trivial task. cms, if content book-length, pre-processing this: each page stored separately, , don't have calculations determine each pages starts inside content html.

however, might cause problems sentences wrap 1 page next: because of pixel differences, split point may vary browser browser, depending on page size, fonts installed, complexity of markup, , on. browsers never intended hold paginated data, though believe getting better (in terms of css support).

there might other complex wrapping issues well, depending on content. in case, wouldn't try measuring font widths server-side , using decide split points, since html/css rendering complicated. there might mileage in using javascript this, though - can see particular browser has split across pages, , start @ next word next page.

it great deal easier if render pages pdf, , load them on demand, embedded object. you'd have determine trade-off accessibility issues, see if road wanted go down.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -