How to break styled text into pages in Android?

UPDATE: I created sample application, that shows how to use PageSplitter. How it works? Example application (Russian) – Cleverum. You need only PageSplitter class. Other code shows you how to use this class. import android.graphics.Typeface; import android.text.SpannableString; import android.text.SpannableStringBuilder; import android.text.TextPaint; import android.text.style.StyleSpan; import java.util.ArrayList; import java.util.List; public class PageSplitter { private final int pageWidth; … Read more

CSS Page-Break Not Working in all Browsers

Parent elements can not have float on them. Setting float:none on all parent elements makes page-break-before:always work correctly. Other things that can break page-break are: using page-break inside tables floating elements inline-block elements block elements with borders