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
-u <URL>, --url <URL> The URL from which the file shall be downloaded. 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 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 6, 2022
Best Practices for Converting PDFs to XML for Structured Data Processing
I am confused by your post. XML has no formatting, so what is it you are preserving? XML formatting is achieved with CSS or XSL-FO or converting to HTML, etc. I have a lot of experience converting multiple file types tp XML. Framemaker, Interleaf, Word, SGML and PDF. Have you tried using Acrobat Pro and simply doing a Save to XML? I recently analyzed a MIL-STD tech pub that was saved to XML. The XML output was well formed and surprisingly easy to analyze. Tables were tables, titles easily identifiable, etc. The next step was to use XSLT to transform that output to the necessary content model. More on reddit.com
🌐 r/xml
4
3
February 17, 2025
🌐
GitHub
github.com › kelvin0 › PyXML2PDF
GitHub - kelvin0/PyXML2PDF: Create PDF from XML file
PyXML2PDF is a pure python module that can generate PDF files from XML. It can be used with the command line or integrated in a python application. PyXML2PDF allows to generate pixel precise PDF documents in any page size.
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 - How do I convert XML to PDF? 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, ...
🌐
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")
🌐
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 ...
Find elsewhere
🌐
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 - My favorite is lxml which includes a version of ElementTree as well as a really nice piece of code that they call “objectify”. This latter piece will basically take XML and turn it into a dot notation Python object. I’ll be using it to do our parsing because it is so straight-forward, easy to implement and understand. As stated earlier, I’ll be using Reportlab to do the PDF creation piece.
🌐
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.
🌐
GroupDocs
products.groupdocs.cloud › groupdocs.conversion › python › convert xml to pdf
XML to PDF Online Converter | Free App & Python Cloud API
November 7, 2025 - Convert XML to PDF online or integrate via Python SDKs. Secure, accurate conversions with OCR, watermarks, and page ranges. Supports 153+ formats.
🌐
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.
🌐
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 - XML File to PDF Conversion REST API and Python SDK ... Converting XML files to PDF files is straightforward using Python SDK of GroupDocs.Conversion Cloud API. This library is the most secure way to convert PDF files quickly from XML. It’s free, secure, and easy to use Python SDK for image ...
🌐
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.
🌐
DocHub
dochub.com › en › functionalities › convert-xml-to-pdf
Online file converter: convert XML to PDF instantly
Convert XML to PDF easily — get your file transformed and ready for processing right after uploading it to our online converter.
🌐
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 - Do you have nested XML files and want to convert them into PDF format to easy to read? If it sounds right, then you are on the right page. This blog is going to explain the best techniques to convert XML to PDF using MS Word, Notepad++, using Python Code, and an automatic solution for large and nested data files.
🌐
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.
🌐
Quora
quora.com › How-do-I-convert-XML-files-to-PDF-files
How to convert XML files to PDF files - Quora
Answer (1 of 3): XML doesn’t turn into a PDF by itself because XML is only about storing structured data, not about how that data should look on a page. To get a PDF, you first have to decide on a visual layout. That’s why the process usually happens in stages rather than a single direct conversi...