Imprimir comentarios al guardar en PDF
Contents
[
Hide
]
Microsoft Excel le permite imprimir comentarios mientras imprime o guarda en formato PDF con las siguientes opciones
- Ninguno
- Al final de la hoja
- Como se muestra en la hoja
Imprimir comentarios al guardar en PDF
Aspose.Cells proporciona las siguientes enumeraciones para respaldar la impresión de comentarios mientras se guarda PDF
- PrintCommentsType.PRINT_NO_COMMENTS
- ImprimirTipoDeComentarios.IMPRIMIR_EN_LUGAR
- ImprimirTipoComentarios.PRINT_SHEET_END
Fragmento de código
El siguiente código de ejemplo ilustra cómo usarImprimirComentariosTipo enum para imprimir comentarios mientras guarda en PDF.
This file contains hidden or 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 | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(PrintComments.class); | |
// Create a workbook from source Excel file | |
Workbook workbook = new Workbook(dataDir + "source.xlsx"); | |
// Access first worksheet | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
// Print no comments | |
worksheet.getPageSetup().setPrintComments(PrintCommentsType.PRINT_NO_COMMENTS); | |
// Print the comments as displayed on sheet | |
worksheet.getPageSetup().setPrintComments(PrintCommentsType.PRINT_IN_PLACE); | |
// Print the comments at the end of sheet | |
worksheet.getPageSetup().setPrintComments(PrintCommentsType.PRINT_SHEET_END); | |
// Save workbook in pdf format | |
workbook.save(dataDir + "out.pdf"); |