diegomura / diegomura/react-pdf

Add callback to text (and possibly other components) to give the coordinates it is being drawn at

Open
#979 3 comments 7 reactions 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

**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

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.