extract page range for pdfs