Adjust image display, generate pdf