Imprimir comentarios al guardar en PDF
Microsoft Excel te permite imprimir comentarios al imprimir o guardar en formato PDF con las siguientes opciones
- Ninguno
- Al final de la hoja
- Según se muestra en la hoja
Aspose.Cells for Python via .NET proporciona la enumeración PrintCommentsType para admitir la misma característica. La enumeración PrintCommentsType tiene los siguientes miembros
- PrintNoComments
- PrintInPlace
- PrintSheetEnd
Imprimir comentarios al guardar en PDF
El siguiente código de ejemplo ilustra cómo usar PrintCommentsType para imprimir comentarios al guardar en PDF.
from aspose.cells import PrintCommentsType, Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Create a workbook from source Excel file | |
workbook = Workbook(dataDir + "SampleWorkbookWithComments.xlsx") | |
# Access first worksheet | |
worksheet = workbook.worksheets[0] | |
/* | |
* For print no comments use "PrintCommentsType.PrintNoComments" | |
* and for print the comments as displayed on sheet use "PrintCommentsType.PrintInPlace" | |
* For Print the comments at the end of sheet we use "PrintCommentsType.PrintSheetEnd" | |
*/ | |
worksheet.page_setup.print_comments = PrintCommentsType.PRINT_SHEET_END | |
# Save workbook in pdf format | |
workbook.save(dataDir + "PrintCommentWhileSavingToPdf_out.pdf") |