Aspose Excel To Pdf. Open in Browser Issue?


#1

Hello,
I am trying the Excel to Pdf convert feature. Although it works fine when i try to save it to a file as shown below, if I try to save it using the browser then the generated pdf file is corrupted and does not open. Is this a known issue ? Any fixes ?
Thanks for the great product,
Anirudh

ps : this is the code


excel.Save(path + “\MySpreadsheet.xml”, FileFormatType.AsposePdf);

Aspose.Pdf.Pdf pdf1 = new Aspose.Pdf.Pdf();

pdf1.BindXML(path + “\MySpreadsheet.xml”, null);

// THIS IS NOT WORKING

//pdf1.Save( “MySpreadsheet.pdf”, Aspose.Pdf.SaveType.OpenInBrowser , this.Response);

pdf1.Save( path + “\MySpreadsheet.pdf” ) ;


#2

Hi,

Thank you for considering Aspose.

Please try adding this line at the end:
Response.End();

If it still won’t work, please send a complete example to me and let me test it.


#3

That worked great ! Thanks a lot.
We might now end up buying both the Excel and the Pdf.
Good work !
Thanks
Anirudh