Convert XBRL to PDF in Python | iXBRL to PDF

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:

  1. Python XBRL to PDF Conversion Library
  2. Convert XBRL to PDF in Python
  3. Convert XBRL to PDF Online
  4. 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:

  1. Load the XBRL file using the XbrlDocument class.
  2. Create an instance of the SaveOptions class and set the SaveFormat to XLSX.
  3. Convert XBRL to XLSX using the XbrlDocument.save() method.
  4. After that, load the XLSX file using the Workbook class.
  5. 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.

Free XBRL to PDF Online Converter
Input file
Output format
  

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.

See Also