Usually you create your file in an
editable format and
then convert it to a viewing
format, such as EPUB, MOBI, or PDF.
The first one: the scanned material is OCR - ed, the text is
then extracted into an
editable text
format (Word or XML),
formatting and structure are applied throughout, and
then the document is converted to a web - friendly
format, like HTML.