AG Studio Launch Week 🚀🚀🚀 28 Sep - 2 Oct 2026 🚀🚀🚀 Join now




Core Features

Advanced Features

React Data GridPDF Export - Hyperlinks

Version 36.2.0
Enterprise

PDF Export can add external URI hyperlinks to body cells and custom content. Hyperlinks are written as native PDF link annotations, so they remain clickable when the document is opened in a compatible PDF viewer.

Supported URI schemes are http, https, mailto, and tel. Other schemes and relative URLs are omitted from the exported PDF.

Use processCellHyperlinkCallback to return the URI for an exported body cell. The callback receives the final exported text together with its row node and column.

gridApi.exportDataAsPdf({
    processCellHyperlinkCallback: (params) => {
        return params.column.getColId() === 'url' ? params.value : undefined;
    },
});

Adding a hyperlink does not change the appearance of the cell. Use cellStyle or processStyleCallback when linked text should use a different colour or other PDF styling.

Set PdfCellData.hyperlink when adding a link to prependContent, appendContent, or getCustomContentBelowRow:

gridApi.exportDataAsPdf({
    appendContent: [
        [
            {
                data: {
                    value: 'AG Grid Documentation',
                    hyperlink: 'https://www.ag-grid.com/documentation/',
                },
                style: {
                    color: '#358ccb',
                },
            },
        ],
    ],
});

The hyperlink is applied to each visible line of the exported cell text. When wrapped content continues onto another page, the corresponding link annotations are added to every page containing that text.

API Copy Link

Export Options Copy Link

See below the functions on the PdfExportParams interface to customise exported grid values.

processCellHyperlinkCallbackCopy Link
Function
Callback that provides an external URI for an exported body cell. The returned URI is added to the PDF as a clickable link annotation.
prependContentCopy Link
PdfCustomContent
Content to put at the top of the exported sheet.
appendContentCopy Link
PdfCustomContent
Content to put at the bottom of the exported sheet.
getCustomContentBelowRowCopy Link
Function
A callback function to return content to be inserted below a row in the export.

PdfCellHyperlinkCallbackParams Copy Link

Properties available on the PdfCellHyperlinkCallbackParams<TData = any, TContext = any> interface.

string
The final text exported for the cell.
accumulatedRowIndexCopy Link
number
The 1-based index of the current exported row.
The row node for the exported cell.
The current column.
The grid api.
Application context as set on gridOptions.context.

PdfCellData Copy Link

Properties available on the PdfCellData interface.

value requiredCopy Link
string | null
The value of the cell.
string
External URI opened when the exported cell text is selected.
PdfImage
Image rendered alongside the cell value.