i'm using mvc to export PDF Document by specific structure and by using the "ExportAsActionResult"
the document is saved but "Corrupted "
with "Failed to load PDF document" message
using Syncfusion.Pdf;
using Syncfusion.Mvc.Pdf;
using Syncfusion.Pdf.Tables;
using Syncfusion.Pdf.Graphics;
public ActionResult ExportPDF()
{
DataTable dataTable = GetDataTable();
PdfDocument doc = new PdfDocument();
PdfPage page = doc.Pages.Add();
PdfLightTable table = new PdfLightTable();
table.DataSource = dataTable;
table.Draw(page, new PointF(20, 15));
return doc.ExportAsActionResult('x.pdf', HttpContext.ApplicationInstance.Response, HttpReadType.Save);
}