TPrintPreview component has a method to calculate the bounding rectangle and the number of pages for the rich edit to be printed.You can find more information about this method on the Readme file and sample demos.