Text pagination for ebook reader on Windows 10 project (UWP)

402 views Asked by At

I'm trying to make a reader app for Windows 10 and stuck with the pagination problem. While searching for some solutions I found projects for WPF and Windows 8 Silverlight, but it seems that in UWP some of needed namespaces, classes etc just missing.

So, I tried to use RichTextBlock with ContentOverflow option and build entire book at once. But this method for a large book is really slow, so it seems I need to find another way.

Another possible solution is to use font metrics to calculate how many words can fit, but FontFamily class doesn't contain any similar fields for that.

1

There are 1 answers

0
Overrided On

Your approach worked for me, and it was pretty fast - small books (< 4mb) was processed and displayed in wery short time, up to 3 seconds. Maybe you should try this way one more time? I used recursive way to parse book and transform all elements into UI elements (like Paragraph) etc.