Bug Details :
In Excel to PDF conversion, Gridlines are rendered improper in merged cells. ExcelToPDF conversion doesn't have support for gridlines of merged region. So support for gridlines with merged region has to be provided.
Code Snipppet :
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
string filePath = @"C:\PrintFormats\CashBook.xlsx";
FileStream excelStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(excelStream);
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
XlsIORendererSettings settings = new XlsIORendererSettings()
{
DisplayGridLines = GridLinesDisplayStyle.Visible,
LayoutOptions = LayoutOptions.FitAllColumnsOnOnePage
};
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook, settings);
string targetPath = @"C:\PrintFormats\Converted.pdf";
Stream stream = new FileStream(targetPath, FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);
excelStream.Dispose();
stream.Dispose();
}