Hi,
We’re using a web service to convert Word, PowerPoint, and Excel files to PDF, but we’ve run into an issue. The file gets uploaded and then converted properly, but when it goes to download the converted file, it errors out.
We’ve found that the save function is finishing before the file gets converted completely (the file is created, but is at 0kb for a little while even though we have stepped out of the conversion function) and so in the web service, it is saying that the conversion is complete when it’s not entirely finished yet. The service then gives the OK to download this incomplete file which causes the error.
Are the Words, Slides, and Cells conversion to PDF being done asynchronously (and if not, then why is it stepping past the save call while the document is still at 0kb)? Is there any way to make it synchronous via some kind of save options or have a callback that lets us know when it is finished so we can handle it that way?
Thank You
Hi,
Thanks for your posting and using Aspose.Total.
Aspose.Cells for .NET is a part of Aspose.Total, you can use Aspose.Cells for .NET to convert your Excel files into Pdf.
For your question relating to Aspose.Cells for .NET, please note Aspose.Cells for .NET conversion to pdf is not done asynchronously but it is done synchronously.
You can verify it by writing a simple web service, below is a code that takes an input xls/xlsx file and convert it into pdf.
C#
string filePath = @“F:\source.xlsx”;
Workbook workbook = new Workbook(filePath);
workbook.Save(filePath + “.out.pdf”);
Also, Aspose.Slides for .NET and Aspose.Words for .NET processes the file synchronously too. I am forwarding your question to Aspose.Slides and Aspose.Words team, they will help you asap.
Hi,
I am representing Aspose.Slides.
As my fellow support team member has already shared with you that Aspose.Slides for .NET processes the file synchronously. Please follow the
link1 and link 2 for your convenience and observe that exporting to PDF is synchronous call. The
link 1 shows exporting presentation to PDF, however link 2 possesses the example of exporting presentation to response streams. You will see in both examples that it is a synchronous call.
Many Thanks,