The method draw_page_finish() can only be called if the method set_defer_drawing() has been called previously otherwise a segmentation fault will occur. This means that the application will crash and even an eval will not be able to recover from that error.
The method set_defer_drawing() can only be called from the callback 'draw-page'.