We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Freeze converting a XLSX file into PDF file

Hi everyone, I'm new in this area...so maybe i'm doing something wrong but i can't convert a XSLX file to a PDF file...I'm following the example on the web:
protected async Task ConvertXlsToPdf(string filename)
byte[] fileStream = await FileHandler.LoadFile(filename, DependencyService.Get().GetDownloadFolder());

Stream stream = new MemoryStream(fileStream);

using (ExcelEngine excelEngine = new ExcelEngine())
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Open(stream);
XlsIORenderer renderer = new XlsIORenderer();

PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);

//Save the PDF document to stream.
MemoryStream stream2 = new MemoryStream();

return stream2;

It freezes on this line
IWorkbook workbook = application.Workbooks.Open(stream);
I attached my xlsx file for test

Attachment: test_c59d087d.rar

1 Reply

AV Abirami Varadharajan Syncfusion Team September 9, 2019 12:29 PM UTC

Hi Matias, 

Greetings from Syncfusion. 

We are unable to reproduce the issue. The shared Excel document is getting converted to PDF properly at our end. We are sharing below sample for your reference. 

Kindly check if the shared sample works fine at your end. If the issue still persist, please share issue reproducing sample along with your working version of Syncfusion assemblies/NuGet. This will be helpful for us to validate further from our side and to provide prompt solution at the earliest. 


Live Chat Icon For mobile
Up arrow icon