# Further reduce image size to ensure it fits on the PDF page
max_width = 6 * inch
max_height = 8 * inch
doc = SimpleDocTemplate(output_pdf_path, pagesize=letter)
story = [RLImage(input_image_path, width=max_width, height=max_height)]
doc.build(story)
output_pdf_path