Posted 3 October 2022, 4:45 pm EST
Hello, i have speed issues when converting a .xlsx into a .pdf.
When i generate the stream from the workbook, if i save in .pdf format, it take more than 12s to get the .pdf stream when the .xlsx stream is done in less than a seconde :
public Stream GenerateStreamFromWorkBook(Workbook workbook, FileDownloadFormat? downloadFormat)
{
var result = new MemoryStream();
workbook.Calculate();
if(downloadFormat == FileDownloadFormat.Pdf)
workbook.Save(result,SaveFileFormat.Pdf);
else
{
workbook.Save(result, SaveFileFormat.Xlsx);
}
result.Position = 0;
return result;
}
is there any way to improve this ?