extract an image from pdf