from PIL import Image
from fpdf import FPDF
# Load the image
image_path = "/mnt/data/A_mind_map_in_the_image_titled_\"GIAPPONE\"_(Japan)_.png"
image = Image.open(image_path)
# Save the image as a PDF
pdf_path = "/mnt/data/Giappone_Mappa_Concettuale_Mohamed_Allach.pdf"
pdf = FPDF()
pdf.add_page()
pdf.image(image_path, x=10, y=10, w=190) # Adjust size and position as needed
pdf.output(pdf_path)
pdf_path