在将其转换为PDF时导出文档结构

Contents
[ ]

PDF逻辑结构提供了一种将有关文档内容结构的信息合并到PDF文件中的机制。Aspose.Cells会保留有关Microsoft Excel文档的结构的信息,例如单元格、行、表、工作表、图像、形状、页眉/页脚等。

使用 PdfSaveOptions.ExportDocumentStructure 选项,您可以保存为具有导出文档结构的带标签PDF。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// 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.ExportDocumentStructure= true;
// Save the pdf file with PdfSaveOptions
wb.Save("output.pdf", pdfSaveOptions);