Hi Don Mason,
Thank you for using Syncfusion products.
We have checked your requirement “Need to set to maintain my gridlines on PDF exporting” and it has been achieved as a workaround solution. Please refer the following code example.
ASPX
<ej:Spreadsheet ID="Spreadsheet1" OnServerPdfExporting="Spreadsheet1_ServerPdfExporting" runat="server">
//...
</ej:Spreadsheet>
|
ASPX.CS
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();
}
|
For your convenience, we have prepared a sample to demonstrate this and the same can be downloaded from the below link.
Could you please check the above sample and let us know whether is this fulfilling your requirement, if not please share us more information regarding this so that we can analyze based on that and provide you a better solution. The information provided would be great help for us to proceed further.
Regards,
Silambarasan