Within my content, there are various styles applied. For example:
This is a <b>bolded</b> word.
I am seeking a solution to divide this long string into smaller sections that would fit on an A4 page accurately. The goal is to maintain the integrity of the entire text over multiple A4 pages, with the scaled-down versions displayed on the device screen.
https://i.sstatic.net/3k05V.png
Past attempts at similar challenges have not yielded results, as I am unsure of where to even begin the process.
In a previous version of the application, the text was split into div
s and utilized elementFromPoint()
to detect overflow onto subsequent pages.
The formatting of the pages is suitable, and now I require a method to identify optimal points for separating the text seamlessly.