/** * Write a block of text at the given coordinates, matching the supplied width and height. * In case a line of text does not fit desired width, it will be wrapped to the next line. * In case the whole text does not fit in desired height, it will be truncated. * * @param string $text Text to write * @param int $width Maximum block width. Negative value means distance from right edge. * @param int|null $height Maximum block height. Negative value means distance from bottom edge. * @param int $x Block X coordinate (column) * @param int $y Block Y coordinate (row) * @param null|int $color (optional) Text color * @param null|int $bgColor (optional) Text background color * * @return void */ public function writeTextBlock($text, $width, $height = null, $x = 0, $y = 0, $color = null, $bgColor = null) { $this->adapter->writeTextBlock($text, $width, $height, $x, $y, $color, $bgColor); }