On our server, we are getting a System.OutOfMemoryException for the following code with the attached file, and when I run it locally on my machine, it just seems to get stuck and not complete. Do you know why?
try
{
Workbook workbook = new Workbook(@“C:\Example.xlsx”);
PdfSaveOptions options = new PdfSaveOptions(SaveFormat.Pdf);
options.AllColumnsInOnePagePerSheet = true;
options.OnePagePerSheet = true;
workbook.Save(@“C:\Example.pdf”, options); //this line hangs
}
catch (Exception ex)
{
throw;
}