The text is placed up and to the right of the point given. The point given is the baseline, left of the text.
(PECL haru >= 0.0.1)
HaruPage::textOut — Imprime el texto en la posición especificada
$x
, float $y
, string $text
) : boolImprime el texto en la posición especificada.
x
y
text
Devuelve TRUE
en éxito.
Lanza una HaruException cuando se produce un error.
The text is placed up and to the right of the point given. The point given is the baseline, left of the text.
a simple sample of textOut :
<?php
$text = "Syuaa is another little programmer";
$doc=new HaruDoc;
$page=$doc->addPage();
//load haru font Times-Roman
$font = $doc->getFont('Times-Roman');
//Begin creating text on x100, y150
$page->beginText();
$page->setFontandSize($font, 12);
$page->textOut(100, 150, $text);
$page->endText();
//Open as pdf
header('Content-type: application/pdf');
$doc->output();
?>