C
C
ceounittt2021-06-07 16:35:09
Web development
ceounittt, 2021-06-07 16:35:09

How to read books from the browser?

I am writing a service that would allow the user to download books in any format for further reading in the browser with pagination and saving progress. I broke my whole head, but I just can not understand how this can be done. I use Java, Spring Boot and Freemarker (to make front end easier).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WapSter, 2021-06-07
@wapster92

Convert files to html on the back, give the result to the front. The text can be divided into pages, and the current page of the book can be saved to the database. Xs over what you can break your head here. You can also simply count how many words the user has read and record the progress as a percentage. Pages make it easier

O
Orkhan Hasanli, 2021-06-07
@azerphoenix

Good afternoon!
Well, firstly,
you need to find a library or libraries in java or in another language that can convert book formats to html. To be honest, various tools may be needed here, up to OCR.
For example, for pdf - https://www.e-iceblue.com/Tutorials/Java/Spire.PDF...
Look for different libs for pdf, doc, docx, txt, fb2, etc. Google
Next, suppose that there is some kind of registration on the site and each user has a progress in reading books. Then there are many aspects that you need to think about. For example, saving progress first on the client side in localStorage, then saving information on the server side.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question