We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PrintSheetEnd for comment does not work

I have used PrintInPlace for comments and that works but PrintSheetEnd does not work. tried with version 17.5.0.0


private bool Convert(string source, string destination)
{
Aspose.Cells.License cellsLicense = new Aspose.Cells.License();
cellsLicense.SetLicense(“Aspose.Total.lic”);

if (Path.GetExtension(source) != “.xls” && Path.GetExtension(source) != “.xlsx”)
return false;
Workbook wb = new Workbook(source);
PdfSaveOptions pdfOptions = new PdfSaveOptions();
foreach (Worksheet ws in wb.Worksheets)
{
if (_printComments_cb.Checked)
{
foreach (Comment c in ws.Comments)
c.IsVisible = true;
ws.PageSetup.PrintComments = PrintCommentsType.PrintSheetEnd;
}
}

wb.Save(destination, pdfOptions);
return true;
}

Hi,


Thanks for your posting and using Aspose.Cells.

We have tested your issue with the most recent version using the following code and it is working fine. Please check the output Pdf and screenshot for your reference.

Latest Version Download Links
Aspose.Cells for .NET v17.5.3 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.5.3 (.NET 4.0) compiled in .NET Framework 4.0.


C#
Workbook wb = new Workbook(“Comment.xlsx”);
PdfSaveOptions pdfOptions = new PdfSaveOptions();

foreach (Worksheet ws in wb.Worksheets)
{
foreach (Comment c in ws.Comments)
c.IsVisible = true;
ws.PageSetup.PrintComments = PrintCommentsType.PrintSheetEnd;
}

wb.Save(“outputComments.pdf”, pdfOptions);

Downloaded 17.5.3 to see if it would work for me. Same result. For some reason I never get the 2nd page with the comment.


Attached sample solution that gives me only first page.

Hi,


Thanks for your posting and using Aspose.Cells.

Please remove old references that are present anywhere or in GAC (global assembly cache) and make sure, you are using the latest version.

You can also check which version of Aspose.Cells you are using at the moment by using CellsHelper.GetVersion() method.

I ran your application and it worked good. Please check its screenshot and the output Pdf file for your reference.