HaruPage::showTextNextLine> <HaruPage::setWordSpace
Last updated: Fri, 24 Feb 2012

HaruPage::showText

(PECL haru >= 0.0.1)

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

Descrição

bool HaruPage::showText ( string $text )

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

Parâmetros

text

The text to show.

Valor Retornado

Returns TRUE on success.

Erros

Joga um HaruException em erro.

Veja Também



User Contributed Notes
HaruPage::showText
aku at syuaa dot net
09-Jun-2011 12:02
My First Hello Text

<?php

$text
= "Hello Text";

$doc=new HaruDoc;
$page=$doc->addPage();

//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->beginText();
$page->setFontandSize($font, 12);
$page->moveTextPos(100,$ypos,false);
$page->showText($text);
$page->endText();

header('Content-type: application/pdf');
$doc->output();

/*[x]syuaa[x]*/
?>

HaruPage::showTextNextLine> <HaruPage::setWordSpace
Last updated: Fri, 24 Feb 2012