print-pdf: Improve PDF printing by setting a window timeout

When the page open callback is invoked, the page might need a little
more time for rendering, hence setting a window timeout.

This fixes the issue that sometimes no or non working (empty or
only partially filled) PDF files were created.

In addition, evaluate status output and print error messages if the
call fails.