change the size of image as that of canvas for pdf