Extract images from pdf and word