在将其转换为PDF时导出文档结构
Contents
[
Hide
]
PDF逻辑结构提供了一种将有关文档内容结构的信息合并到PDF文件中的机制。Aspose.Cells会保留有关Microsoft Excel文档的结构的信息,例如单元格、行、表、工作表、图像、形状、页眉/页脚等。
使用选项PdfSaveOptions.ExportDocumentStructure,您可以保存为带有导出文档结构的标记PDF。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Open the excel file with image, shape, chart, etc. | |
Workbook wb = new Workbook("document-structure-example.xlsx"); | |
// Set to export document structure. | |
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); | |
pdfSaveOptions.setExportDocumentStructure(true); | |
// Save the pdf file with PdfSaveOptions | |
wb.save("output.pdf", pdfSaveOptions); |