diegomura / diegomura/react-pdf

Support hyperlinks in <Canvas />

Open
#3,030 1 comment 1 reaction 0 assignees View on GitHub
new feature
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

react-pdf supports drawing objects via a `` and uses PDFKit under the hood, but not all of its functions are supported (the ones that are are whitelisted [here](https://react-pdf.org/components#canvas)). Specifically PDFKit's `.link` or the `link` option that can be passed to `.text` are not available (I tested in the playground). Here is what I tried in [the playground](https://react-pdf.org/repl):

```javascript
const LinkTest = () => (


{
painter.text('Here is a link!', {link: 'https://google.com'})
}}>



);

ReactPDF.render();
```

It would be great if this could be supported, or maybe any/all PDFKit functions? Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.