Pypdf directory loader. pages[0] count = 0 for image_file_object in page.