downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

HaruPage::textRect> <HaruPage::stroke
[edit] Last updated: Fri, 25 May 2012

view this page in

HaruPage::textOut

(PECL haru >= 0.0.1)

HaruPage::textOutAffiche 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



add a note add a note User Contributed Notes HaruPage::textOut
aku at syuaa dot net 09-Jun-2011 02:53
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();
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites