relaxed pattern matching for page number to fix "pdf" error