Change pngToPdf to support all image types