I'm not sure I understand the question fully, but are you expecting pisa to apply the xslt transformation? I don't think it will do that (you might want to look at lxml and use that to apply the xslt before converting to pdf with pisa)

Answer from Steven on Stack Overflow
🌐
PyPI
pypi.org › project › pyxml2pdf
pyxml2pdf · PyPI
This is only used, if the specified local file is not present. Defaults to 'https://github.com/BjoernLudwigPTB/pyxml2pdf/blob/main/input/template.xml' -p <path to Pdf file>, --pdf <path to Pdf file> The file path to store the created PDF to.
      » pip install pyxml2pdf
    
Published   Nov 11, 2025
Version   0.3.5
Discussions

Convert xml to pdf in Python - Stack Overflow
I have a problem when I try to convert a XML file in a PDF file, here I’m going to explain briefly how I try to generate a PDF file. We suppose I get the information from a database, then the code More on stackoverflow.com
🌐 stackoverflow.com
¿Is there an easy (and free) way of converting '.xml' files to '.pdf'? (using python, of course)
Do a Google for pypdf2. Am on my phone or if provide a link to the github page. I user it to merge PDFs, but can easily write PDFs. Should probably write the XML parser part just for the same of having full control. More on reddit.com
🌐 r/learnpython
7
0
November 15, 2014
Accurate Geometry Extraction and Preservation in PDF to XML Conversion
🌐 r/Python
1
1
April 16, 2024
Converting pdf files to text or xml files without losing format
Raw text files don’t have formatting. What “format” are you trying to preserve? What have you tried so far? Where is it not doing what you want it to do? More on reddit.com
🌐 r/learnpython
5
2
January 7, 2022
🌐
GitHub
github.com › kelvin0 › PyXML2PDF
GitHub - kelvin0/PyXML2PDF: Create PDF from XML file
So please feel free to contribute patches and ideas. Simply run the following command within root directory of the project: ... ###In your python code: from PyXML2PDF import xml2pdf xml2pdf.genpdf(in_xml_filename, out_pdf_filename)
Starred by 11 users
Forked by 5 users
Languages   Python 100.0% | Python 100.0%
🌐
Aspose
products.aspose.com › aspose.cells › python via java › conversion › xml to pdf
Python XML to PDF - XML to PDF Converter | products.aspose.com
November 13, 2025 - Add a library reference (import the library) to your Python project. Load XML file with an instance of Workbook. Convert XML to PDF by calling Workbook.save method.
🌐
Aspose
blog.aspose.com › aspose blog › how to convert xml to pdf in python
Convert XML to PDF in Python | Convert XML File to PDF
January 11, 2024 - Aspose.PDF for Python stands as a robust solution for PDF generation, manipulation, and conversion, offering developers unparalleled control over document workflows. Please download the package or install the API from PyPI using the following pip command in the console: ... Create an object ...
🌐
Aspose
products.aspose.cloud › aspose.cells › python › conversion › xml to pdf conversion
Convert XML to PDF using Python
February 5, 2023 - This Cloud SDK empowers Python developers with powerful functionality and ensures high-quality PDF output. # For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/ import os import shutil from asposecellscloud.apis.cells_api import CellsApi cells_api = CellsApi(os.getenv('ProductClientId'),os.getenv('ProductClientSecret')) file1 = cells_api.cells_workbook_put_convert_workbook("Book1.xml",format="pdf") shutil.move(file1, "destFile.pdf")
Find elsewhere
🌐
Aspose
kb.aspose.com › pdf › python › how-to-convert-xml-to-pdf-in-python
How to Convert XML to PDF in Python
February 3, 2023 - These steps summarize the process to change XML to PDF in Python. First of all, configure the environment by installing the latest version of the library. Then proceed to load the XML file and render it as a PDF document as per your requirements. This code snippet is sufficient to convert XML file to PDF in Python.
🌐
e-iceblue
e-iceblue.com › Tutorials › Python › Spire.XLS-for-Python › Program-Guide › Conversion › Python-Convert-XML-to-Excel-and-XML-to-PDF.html
Python: Convert XML to Excel and XML to PDF
Learn how to convert XML to Excel and XML to PDF using Spire.XLS for Python. Master the process with step-by-step instructions and tips for efficient data transformation.
🌐
Medium
medium.com › @alexaae9 › convert-xml-or-csv-to-pdf-using-python-excel-library-c1ec1e43bb21
Convert XML or CSV to PDF Using Python Excel Library | by Alexander Stock | Medium
November 21, 2024 - The third library I utilize is Spire.XLS for Python, a robust API designed for creating, reading, and manipulating Excel files. With its user-friendly interface, users can effortlessly import data from XML or CSV files into a worksheet.
🌐
Mouse Vs Python
blog.pythonlibrary.org › home › parsing xml and creating a pdf invoice with python
Parsing XML and Creating a PDF Invoice with Python - Mouse Vs Python
January 31, 2020 - I also import the decimal module as I will be adding amounts and it is much more accurate for float mathematics than just using normal Python math. Next we create our PDFOrder class which accepts two arguments: an xml file and a pdf file path. In our initialization method, we create a couple class properties, read the XML file and return an XML object. The coord method is for positioning Reportlab flowables, which are dynamic objects with the ability to split across pages and accept various styles. The createPDF method is the meat of the program. The canvas object is used to create our PDF and “draw” on it.
🌐
ActiveState
code.activestate.com › recipes › 578561-xml-to-pdf-book-with-elementtree-and-xtopdf
XML to PDF book with ElementTree and xtopdf « Python recipes « ActiveState Code
June 16, 2013 - This recipe shows how to create a PDF book from XML text content. It requires my xtopdf toolkit, the ElementTree module (from Python's standard library) and the open source version of the ReportLab toolkit.
🌐
GroupDocs Cloud
blog.groupdocs.cloud › groupdocs cloud blog › convert xml to pdf in python using rest api
Convert XML to PDF in Python using REST API
October 31, 2022 - Create an instance of ConvertApi, set the values of the convert settings, and invoke the convertDocument method with ConvertDocumentRequest to transform XML to PDF file format. ... Yes, Python XML to PDF library works very fast and you can convert XML to PDF quickly, in a few seconds.
🌐
Apryse
apryse.com › blog › xml-to-pdf-python-server-sdk
Convert XML to PDF Using Python & Server SDK | Apryse
2 weeks ago - Learn how to transform XML into structured JSON and generate professional PDFs using a DOCX template with the Apryse Server SDK in Python.
🌐
SysTools Group
systoolsgroup.com › home › how to convert xml to pdf? expert guide
Convert XML to PDF Securely: 4 Methods to Open XML in PDF
January 15, 2026 - Here’s a basic step-by-step outline using Python scripts: Step 1: Start importing required resources. ... The FPDF library is exploited here to convert the above XML content into a PDF form.
🌐
RecoveryTools
recoverytools.com › home › how to convert xml to pdf format? quick & easy solutions!
Convert XML to PDF in Batch of Any Source - Free & Pro Solutions
September 1, 2025 - The Conversion of XML document to PDF format can be done with the help of the PYXML2PDF or HTML2PDF library. This is a lightweight python library that allows converting XML files to PDF format in a quick way.
🌐
Gearheart
gearheart.io › blog › how-generate-pdf-files-python-xhtml2pdf-weasyprint-or-unoconv
How to Generate PDF Files in Python with Xhtml2pdf, WeasyPrint or Unoconv
Xhtml2pdf is a CSS/HTML to PDF generator/converter and Python library that can be used in any Python framework such as Django. In fact, to create PDFs, the tool uses ReportLab, a common open source Python library for generating PDF files.
🌐
CoolUtils
coolutils.com › online › py to pdf
Convert PY to PDF Online for Free | CoolUtils
Simply visit our website through your mobile browser, upload your file, select the desired output format, and convert it — no app installation required. Need to send or archive a Python script without worrying about editors or line endings? This online PY-to-PDF converter turns .py files into tidy, paginated PDF documents—perfect for code reviews, legal handoffs, coursework, and documentation.
Rating: 4.9 ​ - ​ 1.67K votes