PDF plugin: delay scanning until document is ready