Pdf Component - PdfLinkType
30 Sep 20261 minute to read
Public enum to define the action type of an explicit PdfLink assigned to a PdfGridCell.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access the first page
let page: PdfPage = document.getPage(0);
// Create a data-source grid
let grid: PdfGrid = new PdfGrid([{ id: '1' }], [{ field: 'id' }]);
// Assign an explicit URI link to a cell
grid.getRow(0).cells[0].link = { type: PdfLinkType.externalLink, uri: 'https://www.syncfusion.com' };
// Draw the grid on the page
grid.draw(page, { x: 10, y: 10, width: 240, height: 160 });
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();-
externalLink- Specifies a link that opens an external URI. -
file- Specifies a link that opens an external file. -
internalLink- Specifies a link that navigates to a destination within the document.