Pdf - PdfGridHorizontalOverflowType
30 Sep 20261 minute to read
Specifies how a PdfGrid handles content that exceeds the available horizontal drawing area.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access the first page
let page: PdfPage = document.getPage(0);
// Create a grid with horizontal overflow set to nextPage
let grid: PdfGrid = new PdfGrid(rows, columns);
grid.horizontalOverflow = PdfGridHorizontalOverflowType.nextPage;
// 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();-
lastPage- Specifies the type oflastPage. Completes the vertical flow of the current horizontal segment
before rendering the next horizontal segment. -
nextPage- Specifies the type ofnextPage. Continues overflowed columns on immediately following pages
for the same vertical row range before moving to the next vertical row range. -
onePage- Specifies the type ofonePage. Keeps all logical columns in one horizontal segment.