在将其转换为PDF时导出文档结构
Contents
[
Hide
]
PDF逻辑结构功能提供了一种将有关文档内容结构的信息合并到PDF文件中的机制。Aspose.Cells for Python via .NET保留了从Microsoft Excel文档中导出的结构信息,例如单元格、行、表、工作表、图像、形状、页眉/页脚等。
通过选项PdfSaveOptions.export_document_structure,您可以将标记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
from aspose.cells import PdfSaveOptions, Workbook | |
# 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. | |
wb = Workbook("document-structure-example.xlsx") | |
# Set to export document structure. | |
pdfSaveOptions = PdfSaveOptions() | |
pdfSaveOptions.export_document_structure = True | |
# Save the pdf file with PdfSaveOptions | |
wb.save("output.pdf", pdfSaveOptions) |