(PECL haru >= 0.0.1)

HaruPage::showTextPrint text at the current position of the page


bool HaruPage::showText ( string $text )

Prints out the text at the current position of the page.

Elenco dei parametri


The text to show.

Valori restituiti

Returns TRUE on success.


Lancia un'eccezione HaruException in caso di errore.

Vedere anche:

add a note add a note

User Contributed Notes 1 note

aku at syuaa dot net
6 years ago
My First Hello Text


= "Hello Text";

$doc=new HaruDoc;

//load haru font Times-Roman
$font = $doc->getFont('Times-Roman');

//Set margin top to 50 pixel
$mTop = 50;

//Set first yPos, you will need to reduce text height
$ypos = $page->getHeight()-$mTop-12;

$page->setFontandSize($font, 12);

header('Content-type: application/pdf');

To Top