Is there any way to figure out the height and width (in pixels) of the text inserted? #145
-
I am using function pdf_add_text_wrap to add text to the pdf. However, given the string, font family and the font size, is there any way to calculate the expected width and height the string might take on the paper. This will be really benefical as I am trying to build a insert table function from this library. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
pdf_add_text_wrap
already takes the width as an argument, so that is known, and it returns the height in*height
- one of its parameters. This is all after the fact though, but is that enough for you to know where to put the lines for the table (basically x + width + border and y + height + border)?