Closed kaunnikov closed 3 years ago
Setting a text align doesn’t seem possible I think.
You can use $fontContent->wrapText(…);
to split the text into lines and position every single line separately.
$lines = explode("\n", $fontContent->wrapText($value, 1650, 0));
foreach ($lines as $lineNumber => $line) {
$image->draw()->text(
$line,
$fontContent,
new Point(
1650 - $fontContent->box($line)->getWidth(),
$lineNumber * 50
)
);
}
I use: `
`