diff --git a/lpdf.php b/lpdf.php index a2ef6b0..11e79fa 100644 --- a/lpdf.php +++ b/lpdf.php @@ -512,6 +512,13 @@ class lpdf pdf_show_xy($this->pdf,$text,$this->loc($xpos),$this->loc($this->yloc)); } + function stringWidth($text, $font=null, $size=null) + { + if($size == null) $size = pdf_get_value($this->pdf,"fontsize",0); + if($font == null) $font = $this->normalfont; + return pdf_stringwidth($this->pdf, $text, $font, $size); + } + function nextLine() { $fontsize=pdf_get_value($this->pdf,"fontsize",0);