PDF ye kaydederken Yorumları Yazdır
Microsoft Excel, aşağıdaki seçeneklerle PDF biçimine yazdırırken veya kaydederken yorumları yazdırmanıza izin verir
- Hiçbiri
- Sayfa sonunda
- Sayfada gösterildiği gibi
Aspose.Cells for Python via .NET, aynı özelliği desteklemek için PrintCommentsType enumunu sağlar. PrintCommentsType enumunun aşağıdaki üyeleri bulunmaktadır
- PrintNoComments
- PrintInPlace
- PrintSheetEnd
PDF’ye kaydederken yorumları yazdır
Aşağıdaki örnek kod, PDF’ye kaydederken yorumları yazdırmak içinPrintCommentsType nasıl kullanılacağını gösterir.
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") |