Pdf - PdfGridBorderType

18 Nov 20261 minute to read

Specifies the border groups to be rendered for a PdfGrid.
This enumeration supports bitwise combination of values to include or
exclude specific outer and inner border groups when rendering a grid.

let document: PdfDocument = new PdfDocument(data, password);
// Access the first page
let page: PdfPage = document.getPage(0);
let grid: PdfGrid = new PdfGrid();
grid.style.border = {
    type: PdfGridBorderType.Outside | PdfGridBorderType.InsideHorizontal,
    pen: {
        width: 1
    }
};
// Draw the grid on the page
grid.draw(page, { x: 10, y: 10, width: 240, height: 400 });
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • All - Selects all outside and inside border groups.
  • Bottom - Selects or excludes the outside-bottom group.
  • Inside - Composite selector for both inside groups.
  • InsideHorizontal - Selects or excludes inside-horizontal separators.
  • InsideVertical - Selects or excludes inside-vertical separators.
  • Left - Selects or excludes the outside-left group.
  • None - Empty mask.
  • Outside - Composite selector for all four outside groups.
  • Right - Selects or excludes the outside-right group.
  • Top - Selects or excludes the outside-top group.