# import xml.etree.ElementTree as ET
# from reportlab.pdfgen import canvas
# from reportlab.lib.pagesizes import letter

# # Load XML file
# tree = ET.parse('/mnt/hdd2T/AICR/Projects/2023/Xml_SAVINA/2023-04-20_0101803564_0300741922_1C23TYY_714.xml')
# root = tree.getroot()

# # Create PDF canvas
# pdf_canvas = canvas.Canvas('./2023-04-20_0101803564_0300741922_1C23TYY_714.pdf', pagesize=letter)

# # Iterate over XML elements and draw on PDF canvas
# for element in root.iter():
#     if element.tag == 'paragraph':
#         pdf_canvas.drawString(int(element.get('x')), int(element.get('y')), element.text)
#     elif element.tag == 'image':
#         pdf_canvas.drawImage(element.get('src'), int(element.get('x')), int(element.get('y')), int(element.get('width')), int(element.get('height')))

# # Save PDF file
# pdf_canvas.save()

import pyxml2pdf

# Create an XML file


# Create a new xml2pdf object
xml2pdf = pyxml2pdf.("/mnt/hdd2T/AICR/Projects/2023/Xml_SAVINA/2023-04-20_0101803564_0300741922_1C23TYY_714.xml")

# Save the output PDF file
xml2pdf.save("my_pdf_file.pdf")