fix the case when it is a single-page pdf.