Use the getPageHeight method in the callback onFirstContentfulPaint after web page rendering is complete.