Renderizar línea de cuadrícula sólida al convertir Excel a PDF

Contents
[ ]

Para compatibilidad con versiones antiguas, Aspose.Cells renderiza la línea de cuadrícula como línea de puntos por defecto al convertir Excel a PDF. Sin embargo, Excel moderno renderiza la línea de cuadrícula como línea sólida en la actualidad.

Con la opción PdfSaveOptions.GridlineTypes, Aspose.Cells también puede renderizar la línea de cuadrícula como línea sólida.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Create an empty Workbook
Workbook wb = new Workbook();
//Prepare data
wb.Worksheets[0].Cells["D9"].PutValue("gridline");
//Enable to print gridline
wb.Worksheets[0].PageSetup.PrintGridlines = true;
//Set to render gridline as solid line
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.GridlineType = GridlineType.Hair;
// Save the pdf file with PdfSaveOptions
wb.Save(TMP_DIR + "test_Cs.pdf", pdfSaveOptions);

solid-gridline.png