/// <summary> /// To the PDF form. /// </summary> /// <param name="htmlContent">Content of the HTML.</param> /// <param name="showPageLabels">if set to <c>true</c> [show page labels].</param> /// <param name="horizontal">if set to <c>true</c> [horizontal].</param> /// <returns> /// PDF file bytes. /// </returns> public static byte[] ToPdfForm(this string htmlContent, bool showPageLabels, bool horizontal) { return(FileExportExtensions.GeneratePdfFromHtml(htmlContent, showPageLabels, horizontal)); }
/// <summary> /// To the excel byte array. /// </summary> /// <param name="dt">The data table.</param> /// <param name="sheetName">Name of the sheet.</param> /// <param name="orgName">Name of the org.</param> /// <param name="sheetHeader">The sheet header.</param> /// <returns> /// the byte array. /// </returns> public static byte[] ToExcelByteArray(this DataTable dt, string sheetName, string orgName, string sheetHeader = null) { return(string.IsNullOrEmpty(sheetHeader) ? FileExportExtensions.WriteToExcel(dt, sheetName) : FileExportExtensions.WriteToExcel(dt, sheetName, orgName, sheetHeader)); }
/// <summary> /// To the PDF byte array. /// </summary> /// <param name="dt">The data table.</param> /// <returns>the content in byte array.</returns> public static byte[] ToPdfByteArray(this DataTable dt) { return(FileExportExtensions.WriteToPdf(dt)); }