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();
?>
HaruPage::textOut
(PECL haru >= 0.0.1)
HaruPage::textOut — Affiche le texte à la position spécifiée
Description
bool HaruPage::textOut
( float
$x
, float $y
, string $text
)Affiche le texte à la position spécifiée.
Liste de paramètres
-
x -
-
y -
-
text -
Valeurs de retour
Retourne TRUE en cas de succès.
Erreurs / Exceptions
Émet une exception HaruException en cas d'erreur.
Voir aussi
- HaruPage::showTextNextLine() - Déplace la position courante au début de la prochaine ligne et affiche le texte
- HaruPage::showText() - Affiche le texte à la position courante de la page
aku at syuaa dot net ¶
2 years ago
