diegomura / diegomura/react-pdf
How to get the size of a view programatically
- 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.**
We are trying to find a way to get the width and height in PT of each rendered component.
**Describe the solution you'd like**
Maybe exposing those values from the View, Text, Image, etc components would be a valuable.
**Describe alternatives you've considered**
We have tried implementing some HTML with styles similar to the printed pdf size, and converting PX to PT but the value, even though it is close, is not accurate.
**Additional context**
What we really need is to get the same numbers that appear on `debug={true}` so that we can make some decisions depending on the size of the elements.
Contributor guide
Assessment
This issue has not been assessed yet.