I need to print plain text. Text has arbitrary length from one page to many. User may use various sizes of paper, fonts. The problem is how to calculate number of pages in functions HasPage,GetPageInfo.wxDC is unavailable so I can't know neither font size in mm nor page size.