ensure pdf pages are never zero-height
wait for document to load before triggering pdf layout