def embed_screenshot_to_receipt(screenshot_path, pdf_path): """Embeds the screenshot to the bot receipt""" pdf = PDF() pdf.add_watermark_image_to_pdf(image_path=screenshot_path, source_path=pdf_path, output_path=pdf_path)
Using pdf.add_watermark_image_to_pdf
This method you can embed screenshot in pdf