Fix to detect empty pdfs when determining dpi using pdfimages