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 las líneas de cuadrícula como líneas sólidas.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// Create an empty Workbook
Workbook wb = new Workbook();
//Prepare data
wb.getWorksheets().get(0).getCells().get("D9").putValue("gridline");
//Enable to print gridline
wb.getWorksheets().get(0).getPageSetup().setPrintGridlines(true);
//Set to render gridline as solid line
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.setGridlineType(GridlineType.HAIR);
// Save the pdf file with PdfSaveOptions
wb.save("output.pdf", pdfSaveOptions);

solid-gridline.png