r/HTML • • Oct 26 '26

Discussion Best way to render book in web

With pages support.

Options right now:

EDIT: I meant to render the books like their printed edition, preserving pages

1 Upvotes

13 comments sorted by

5

u/tomtomato0414 Oct 26 '26

Epub is HTML+CSS

What is the question?

1

u/DontKnowWhat0 Oct 26 '26

I want to render some books like their printed edition, preserving pagination.

1

u/tomtomato0414 Oct 26 '26

Some epubs have that info, some dont

1

u/DontKnowWhat0 Oct 26 '26

Yeah. EPUB3 supports a fixed-layout mode.

3

u/JeLuF Oct 26 '26

What shall a "page" be?

Shall a "page" be the content of a single browser screen, without scrolling?

Shall a "page" reflect the pages from the printed edition?

Shall a "page" be a section, chapter, or subchapter?

0

u/DontKnowWhat0 Oct 26 '26

Shall a "page" reflect the pages from the printed edition?

this

1

u/JeLuF Oct 26 '26

Create an HTML file per page, add a "next page" link to each.

2

u/armahillo Expert Oct 26 '26

This says nothing about how the viewer is consuming the book.

The best way to render it in Web would be the way the web was built to handle it: one document per chapter, a main index that shows the table of contents, and each page has links to the previous and next chapters.

But people dont typically consume books through web browsers. So I’m assuming you mean something different; you’ll need to specify that

1

u/DontKnowWhat0 Oct 26 '26

Render books like their printed edition, preserving pages.

1

u/armahillo Expert Oct 26 '26

ok but rendered where? how is the user consuming the content?

1

u/DontKnowWhat0 Oct 26 '26

rendered in the web, viewed in a browser, as paginated content.

2

u/armahillo Expert Oct 26 '26

but why do that though? Pages are a limitation of the book format; why artificially impose that constraint in a format that doesnt need it?

1

u/UpbeatLemon3022 Oct 27 '26

EPUB3 supports fixed-layout, which is meant for page-accurate rendering like printed books, but browser support is spotty unless you use a JS EPUB viewer like epub.js. HTMLBook is easier for direct web use but less precise on pagination.