PDF: prevent read access violation (fixes #32)