fix oversized images in pdf