PDF: speed up pdf_lookup_page_number for PdfEngine