BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
I am using aspnet webforms and rendering an Excel document in the Spreadsheet control (works awesome !)
When I export to PDF (SaveAsPDF) I loose all my gridlines.
Is there a style setting or property I need to set to maintain my gridlines?
Thanks-
Don
<ej:Spreadsheet ID="Spreadsheet1" OnServerPdfExporting="Spreadsheet1_ServerPdfExporting" runat="server">
//...
</ej:Spreadsheet>
|
using Syncfusion.Pdf;
using Syncfusion.ExcelToPdfConverter;
//...
protected void Spreadsheet1_ServerPdfExporting(object sender, Syncfusion.JavaScript.Web.SpreadsheetEventArgs e)
{
var args = e.Arguments;
//Convert Spreadsheet data as Stream
Stream streamData = Spreadsheet.Save(args["sheetModel"].ToString(), args["sheetData"].ToString(), ExportFormat.XLSX, ExcelVersion.Excel2013);
streamData.Position = 0; //Reset reader position
ExcelToPdfConverter converter = new ExcelToPdfConverter(streamData);
PdfDocument pdfDocument = new PdfDocument();
Syncfusion.ExcelToPdfConverter.ExcelToPdfConverterSettings settings = new Syncfusion.ExcelToPdfConverter.ExcelToPdfConverterSettings();
settings.DisplayGridLines = GridLinesDisplayStyle.Visible; //Setting option to visible Gridlines
pdfDocument = converter.Convert(settings);
pdfDocument.Save("Sample.pdf", Response, HttpReadType.Save);
pdfDocument.Close();
converter.Dispose();
}
|
Perfect!
works awesome.
Thank You