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
🌐
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%
Discussions

Convert xml to pdf in Python - Stack Overflow
It generates me the next file ... the labels that they are in pdf, It would show the following code: xmlvalidations/BE_validation_mid2010.xml reports/EN_Report.xml · My question is, How I can parser a XML file in python, I read it as an HTML file?... More on stackoverflow.com
🌐 stackoverflow.com
How do I convert XML to HTML in python? - Stack Overflow
I can't get xml.etree.ElementTree to print or acknowledge the correct XHTML header. It insists on giving a generic XML header, prefixing all tags with "html:", throwing exceptions, or a combination... 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 13, 2014
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 5, 2022
🌐
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
🌐
Aspose
products.aspose.com › aspose.cells › python via .net › conversion › xml to html
Convert XML to HTML in Python Excel Library
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 HTML 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 - Please download the package or install the API from PyPI using the following pip command in the console: ... Create an object of the Document class. Bind XML using the Document.bind_xml(file) method by providing the XML file path. Convert XML to PDF using the Document.save(output_file_name) method.
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 - This brief tutorial covers how to convert XML to PDF in Python. It includes all the details to configure the system environment, program algorithm, and a code snippet to demonstrate the conversion of XML document to PDF in Python with a few lines of code.
🌐
Aspose
products.aspose.com › aspose.cells › python via java › conversion › xml to pdf
Convert XML to PDF in Python Excel Library
November 13, 2025 - With Aspose.Cells for Python library, you can easily convert XML to PDF programmatically with a few lines of code. Aspose.Cells for Python is capable of building cross-platform applications with the ability to generate, modify, convert, render and print all Excel files. Python Excel API not only convert between spreadsheet formats, it can also render Excel files as images, PDF, HTML, ODS, CSV, SVG, JSON, WORD, PPT and more, thus making it a perfect choice to exchange documents in industry-standard formats.
🌐
Renderx
renderx.com › solutions › html_to_pdf.html
HTML to PDF - XML to PDF, PostScript, AFP
RenderX XEP processor can be used to convert XML and HTML (XHTML) to PDF, PostScript, or any other output format supported by XEP.
🌐
Nikhil Ramesh
nikku1234.github.io › 2020-09-27-PDF-Conversions-using-Python-Packages
Converting pdf to other formats using python | Nikhil Ramesh
September 27, 2020 - Takes a PDF as input and outputs an HTML-like representation of the document's structure. By default, this conversion is done using heuristics. However, a model can be provided as a parameter to use a machine-learning-based approach. positional arguments: pdf_file PDF file name for which tree structure needs to be extracted optional arguments: -h, --help show this help message and exit -mt {vision,ml,None}, --model_type {vision,ml,None} Model type to use.
🌐
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 - In this blog post, I’ll guide you through the process of converting XML and CSV to PDF using a Python Excel library.
🌐
Aspose
products.aspose.cloud › aspose.total › python › conversion › xml to html conversion
Convert Excel to HTML, XML to HTML FREE Converter or Python SDK
September 23, 2023 - Set ConvertDocumentRequest with parameters local file name and format as HTML · Call WordsApi convertDocument to convert XML document to HTML
🌐
PDFTables
pdftables.com › blog › pdf-to-excel-with-python
How to convert a PDF to CSV or Excel with Python — PDFTables
Or if you'd prefer to install it manually, you can download it from python-pdftables-api then install it with: ... import pdftables_api c = pdftables_api.Client('my-api-key') c.xlsx('input.pdf', 'output') #replace c.xlsx with c.csv to convert to CSV #replace c.xlsx with c.xml to convert to XML #replace c.xlsx with c.html to convert to HTML
🌐
O'Reilly
oreilly.com › library › view › python-xml › 0596001282 › ch03s06.html
Converting XML to HTML - Python & XML [Book]
December 18, 2001 - Converting XML to HTMLThe PyXML package contains XML parsers, including PyExpat, as well as support for SAX and DOM, and much more. While learning the ropes of the PyXML package, it... - Selection from Python & XML [Book]
Authors   Christopher A. JonesFred L. Drake
Published   2001
Pages   380
🌐
Apache PDFBox
products.documentprocessing.com › conversion › python › pdfminer.six
pdfminer.six | Convert PDF to HTML/XML in Python
June 25, 2025 - python3 -m venv venv venv\Scripts\activate.bat pip install pdfminer.six · We can convert a PDF document to HTML format using the pdfminer.six library’s extract_text_to_fp function (with output type set to html) provided by the library, as shown in the below code snippet: The following screenshot shows the HTML file generated by converting the PDF document: We can also convert a PDF document to XML format using the same extract_text_to_fp function (but with output type set to xml) provided by the library, as shown in the below code snippet: