diegomura / diegomura/react-pdf
Add callback to text (and possibly other components) to give the coordinates it is being drawn at
Open
new feature
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 1.3k
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 52
Description
**Is your feature request related to a problem? Please describe.**
AFAICT, it is not currently possible to extract the coordinates a given component is being drawn at. At least for `Text` components, I believe that we can have the call back just return the `top` and `left` coordinates at https://github.com/diegomura/react-pdf/blob/master/src/elements/Text.js#L231
**Describe the solution you'd like**
An API like this:
```typescriptreact
{
... // do stuff with those numbers
}>
Lorem..
Contributor guide
Assessment
This issue has not been assessed yet.