Manuals

 

SetaPDF_TextStamp::setFont()

Description

class SetaPDF_TextStamp extends SetaPDF_Stamp {
mixed setFont ( string $fontfamily[, string $fontstyle=''[, float $fontsize=12[, float $lineHeight=null[, string $align='L'[, integer $renderingMode=0[, float $outlinewidth=1[, float $charSpacing=0[, float $wordSpacing=0]]]]]]]] ) }

This method is a kind of wrapper for defining all text layout settings within one method-call.

Parameters

$fontfamily

The name of a standard Adobe Type 1 font. Available font names are:

  • Times
  • Helvetica (Arial)
  • Courier
  • Symbol
  • ZapfDingbats

Standard: Helvetica

$fontstyle

The fontstyle of the given font. Possible values are:

  • empty string: regular
  • B: bold
  • I: italic

or any combination. Bold and italic styles do not apply to Symbol and ZapfDingbats

$fontsize

The fontsize in points.

$lineHeight

The lineheight in points.

$align

Allows to center or align the text. Possible values are:

  • L: left align (default value)
  • C: center
  • R: right align

$renderingMode

An integer value, defining the Text Rendering Mode. Possible values can be found in the PDF specification (5.2.3).

$outlinewidth

The outlinewidth in points.

$charSpacing

The space between the characters in points.

$wordSpacing

The space between words in points.

Return value

True, if everythings works as expected. A SetaPDF_Error object if an error occurs.