PHP 5.6.18 is available

HaruPage::textOut

(PECL haru >= 0.0.1)

HaruPage::textOutPrint the text on the specified position

Descrizione

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

Prints the text on the specified position.

Elenco dei parametri

x

y

text

Valori restituiti

Returns TRUE on success.

Errori/Eccezioni

Lancia un'eccezione HaruException in caso di errore.

Vedere anche:

add a note add a note

User Contributed Notes 3 notes

up
0
dartmetrash at gmail dot com
17 days ago
The text is placed up and to the right of the point given. The point given is the baseline, left of the text.
up
0
aku at syuaa dot net
4 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();
?>
up
-1
Anonymous
17 days ago
The text shows up to the bottom right of the point (x,y).
To Top