Learn how to convert XBRL to PDF using C#.
The following topics are covered in this article:
- C# API to convert XBRL to PDF
- Convert XBRL to PDF
- Convert XML to PDF
Learn how to convert XBRL to PDF using C#.
The following topics are covered in this article:
// Load XBRL document | |
XbrlDocument document = new XbrlDocument(sourceDir + @"sample.xbrl"); | |
// Set save options | |
Aspose.Finance.Xbrl.SaveOptions saveOptions = new Aspose.Finance.Xbrl.SaveOptions(); | |
saveOptions.SaveFormat = Aspose.Finance.Xbrl.SaveFormat.XLSX; | |
// Save XBRL as XLSX in File Stream | |
FileStream fs = new FileStream("sample_out.xlsx", FileMode.Create); | |
document.Save(fs, saveOptions); | |
// Open an Excel file | |
Workbook workbook = new Workbook(fs); | |
// Save the document in PDF format | |
workbook.Save(outputDir + "sample_output.pdf", Aspose.Cells.SaveFormat.Pdf); |
// Load XML document | |
XbrlDocument document = new XbrlDocument(sourceDir + @"sample.xml"); | |
// Set save options | |
Aspose.Finance.Xbrl.SaveOptions saveOptions = new Aspose.Finance.Xbrl.SaveOptions(); | |
saveOptions.SaveFormat = Aspose.Finance.Xbrl.SaveFormat.XLSX; | |
// Save XML as XLSX in File Stream | |
FileStream fs = new FileStream("sample_out.xlsx", FileMode.Create); | |
document.Save(fs, saveOptions); | |
// Open an Excel file | |
Workbook workbook = new Workbook(fs); | |
// Save the document in PDF format | |
workbook.Save(outputDir + "sample_output.pdf", Aspose.Cells.SaveFormat.Pdf); |