将带有图像和图表的 XLS 转换为 PDF

Contents
[ ]

该过程可以在内存中完成,因为该过程不依赖于临时或中间 XML 文件。这意味着可以快速高效地转换大型 Excel 文件,例如包含图像、图表和其他绘图对象的文件。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(ConvertXLSFileToPDF.class);
//Create a new Workbook
Workbook book = new Workbook(dataDir + "SampleInput.xlsx");
//Save the excel file to PDF format
book.save(dataDir + "output.pdf", SaveFormat.PDF);

相关文章