Class Xml2PdfTextTag

Description

Text tags.

Xml2PdfTextTag define the properties and method used to for tags used to write content in the Pdf document. The content can be write using styles information define with Xml2PdfTag_stylesheets.

This class extends Xml2PdfTag, the tag properties define by this parent class (like id) are available in Xml2PdfTextTag.

tag properties:

  • font - string - font (eg times)
  • fontsize - integer - font size (eg 10)
  • fontcolor - string - font color (eg #000000)
  • fontstyle - string - font style [B[U[I]]]
  • lineheight - integer - line height (eg 5)
  • textalign - string - text alignment [L|R|C|J]

Located in /main/Xml2PdfTextTag.php (line 47)

Xml2PdfTag
   |
   --Xml2PdfTextTag
Direct descendents
Class Description
 class Xml2PdfTag_text <text> tag.
 class Xml2PdfTag_header <header> tag.
 class Xml2PdfTag_paragraph <paragraph> tag.
 class Xml2PdfTag_footer <footer> tag.
 class Xml2PdfTag_literal <literal> tag.
 class Xml2PdfTag_link <link> tag.
Variable Summary
 string $font
 string $fontColor
 integer $fontSize
 string $fontStyle
 integer $lineHeight
 array $styleStack
 string $textAlign
 boolean $useStyle
 integer $_indent
 float $_x
Method Summary
 void __construct (object Pdf $pdf, array $tagProperties)
 void close ()
 void render ()
 void _cleanContent ()
 string _makeLine ()
 mixed _parseContent ()
 boolean _printLine (string $line)
 void _setStyle ()
Variables
string $font = PDF_DEFAULT_FONT (line 60)

font.

  • access: public
string $fontColor = PDF_DEFAULT_FONTCOLOR (line 78)

font color.

  • access: public
integer $fontSize = PDF_DEFAULT_FONTSIZE (line 72)

font size.

  • access: public
string $fontStyle = PDF_DEFAULT_FONTSTYLE (line 66)

font style.

  • access: public
integer $lineHeight = PDF_DEFAULT_LINEHEIGHT (line 90)

line height.

  • access: public
array $styleStack (line 96)

used styles stack.

  • access: protected
string $textAlign = PDF_DEFAULT_TEXTALIGN (line 84)

text alignment.

  • access: public
boolean $useStyle = false (line 54)

true if use styles tag to write then content.

  • access: protected
integer $_indent = 0 (line 108)

indentation.

  • access: private
float $_x = 0 (line 102)

current x pos.

  • access: private

Inherited Variables

Inherited from Xml2PdfTag

Xml2PdfTag::$content
Xml2PdfTag::$pdf
Methods
Constructor __construct (line 122)

Constructor.

Parse the tag properties.

  • access: public
void __construct (object Pdf $pdf, array $tagProperties)
  • object Pdf $pdf: object Pdf
  • array $tagProperties: tag properties

Redefinition of:
Xml2PdfTag::__construct()
Constructor.

Redefined in descendants as:
close (line 153)

Manage the trext writing.

  • access: public
void close ()

Redefinition of:
Xml2PdfTag::close()
Close tag.

Redefined in descendants as:
render (line 178)

Text renderer.

Write the text in the PDF if the tag use styles tags.

  • access: public
void render ()

Redefined in descendants as:
_cleanContent (line 418)

Remove the styles information to the content.

  • access: private
void _cleanContent ()
_makeLine (line 271)

Buil the next line to write.

  • access: private
string _makeLine ()
_parseContent (line 216)

Parse the content.

Return a part of the content.

  1.  array(=> 'string'// text witch have been extract or tag name
  2.   => 'string'// c if return closing tag, o if return opening tag, s if return space, t if return text
  3.   => 'string'  // text witch don't be parsed.
  4.   );
Return false if all the content have been parsed.

  • access: private
mixed _parseContent ()
_printLine (line 316)

Write a line.

  • access: private
boolean _printLine (string $line)
  • string $line
_setStyle (line 376)

Search the styles information and put them.

  • access: private
void _setStyle ()

Inherited Methods

Inherited From Xml2PdfTag

 Xml2PdfTag::__construct()
 Xml2PdfTag::addContent()
 Xml2PdfTag::close()

Documentation generated on Wed, 11 Oct 2006 22:27:34 +0200 by phpDocumentor 1.3.0