XBRL (eXtensible Business Reporting Language) is a standardized way to communicate business information electronically, especially financial data. Companies streamline their reporting processes and make it easier to share financial information with stakeholders in XBRL format. In this article, we will learn how to convert XBRL to PDF in Python.
This article covers the following topics:
- Python XBRL to PDF Conversion Library
- Convert XBRL to PDF in Python
- Convert XBRL to PDF Online
- Free Resources
Python XBRL to PDF Conversion Libraries
For XBRL to PDF conversion, we will follow a two-step procedure. Firstly, we will convert XBRL to XLSX using Aspose.Finance for Python, and then we will convert the XLSX to a PDF document using Aspose.Cells for Python.
Please either download the packages or install the APIs from PyPI using the following pip commands in the console:
pip install aspose-finance
pip install aspose-cells-python
Convert XBRL to PDF in Python
We can easily convert the XBRL file (.xbrl) to a PDF document by following the steps below:
- Load the XBRL file using the XbrlDocument class.
- Create an instance of the SaveOptions class and set the SaveFormat to XLSX.
- Convert XBRL to XLSX using the XbrlDocument.save() method.
- After that, load the XLSX file using the Workbook class.
- Finally, call the Workbook.save() method to save the document in PDF format. It takes the output file path and the SaveFormat type (PDF) as arguments.
The following code sample shows how to convert XBRL to PDF in Python.
Get a Free License
You can get a free temporary license to try the library without evaluation limitations.
Online XBRL to PDF Conversion
You may also convert XBRL to PDF online using our high-quality and free XBRL to PDF converter web app, which is developed using the above mentioned libraries.
XBRL to PDF in Python - Free Resources
Besides XBRL to PDF conversion, learn more about the library and explore various other features using the resources below:
Conclusion
In this article, we have learned how, with just a few lines of code, you can convert XBRL to PDF in Python. By following the steps outlined in this article, you can easily develop your own XBR to PDF conversion application. Moreover, we have also introduced an online tool to convert XBRL or iXBRL files into a PDF format on the go. In case of any ambiguity, please feel free to contact us on our free support forum.