PHP 5.6.0RC3 is available

HaruPage::textOut

(PECL haru >= 0.0.1)

HaruPage::textOutPrint the text on the specified position

Descrição

bool HaruPage::textOut ( float $x , float $y , string $text )

Prints the text on the specified position.

Parâmetros

x

y

text

Valor Retornado

Returns TRUE on success.

Erros

Joga um HaruException em erro.

Veja Também

add a note add a note

User Contributed Notes 1 note

up
0
aku at syuaa dot net
3 years ago
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();
?>
To Top