OXID eShop CE  4.10.3
 All Classes Namespaces Files Functions Variables Pages
oxPDF Class Reference
+ Inheritance diagram for oxPDF:
+ Collaboration diagram for oxPDF:

Public Member Functions

 __construct ($orientation= 'P', $unit= 'mm', $format= 'A4', $unicode=true, $encoding= 'UTF-8', $diskcache=false)
 WriteHTML ($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align= '')
 OpenTag ($tag, $attr)
 CloseTag ($tag)
 SetStyle ($tag, $enable)
 PutLink ($sURL, $sText)
 SetFont ($family, $style= '', $size=0, $fontfile= '')

Detailed Description

Including language file Including parent class TCPDF class wrapper, set/overrides oxid specific functionality

Deprecated:
since v5.3 (2016-08-06); class will be moved to the InvoicePDF module.

Definition at line 191 of file oxpdf.php.

Constructor & Destructor Documentation

oxPDF::__construct (   $orientation = 'P',
  $unit = 'mm',
  $format = 'A4',
  $unicode = true,
  $encoding = 'UTF-8',
  $diskcache = false 
)

This is the class constructor. It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes).

Parameters
string$orientationpage orientation. Possible values are (case insensitive):
  • P or Portrait (default)
  • L or Landscape
string$unitUser measure unit. Possible values are:
  • pt: point
  • mm: millimeter (default)
  • cm: centimeter
  • in: inch

A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.
mixed$formatThe format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).
  • 4A0
  • 2A0
  • A0
  • A1
  • A2
  • A3
  • A4 (default)
  • A5
  • A6
  • A7
  • A8
  • A9
  • A10
  • B0
  • B1
  • B2
  • B3
  • B4
  • B5
  • B6
  • B7
  • B8
  • B9
  • B10
  • C0
  • C1
  • C2
  • C3
  • C4
  • C5
  • C6
  • C7
  • C8
  • C9
  • C10
  • RA0
  • RA1
  • RA2
  • RA3
  • RA4
  • SRA0
  • SRA1
  • SRA2
  • SRA3
  • SRA4
  • LETTER
  • LEGAL
  • EXECUTIVE
  • FOLIO
boolean$unicodeTRUE means that the input text is unicode (default = true)
string$encodingcharset encoding; default is UTF-8
boolean$diskcacheif TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower).

public

Since
1.0

Definition at line 209 of file oxpdf.php.

Member Function Documentation

oxPDF::CloseTag (   $tag)

Closing tag

Parameters
object$tagtag name

Definition at line 296 of file oxpdf.php.

oxPDF::OpenTag (   $tag,
  $attr 
)

Opening tag

Parameters
object$tagtag name
object$attrattributes

Definition at line 276 of file oxpdf.php.

oxPDF::PutLink (   $sURL,
  $sText 
)

Put a hyperlink

Parameters
object$sURLlink url
object$sTextlink text

Definition at line 331 of file oxpdf.php.

oxPDF::SetFont (   $family,
  $style = '',
  $size = 0,
  $fontfile = '' 
)

Sets font for current text line

NOTICE: In case you have problems with fonts, you must override this function and set different font

Parameters
string$familyfont family
string$stylefont style [optional]
string$sizefont size [optional]
string$fontfilefont file[optional]

Definition at line 350 of file oxpdf.php.

oxPDF::SetStyle (   $tag,
  $enable 
)

Modify style and select corresponding font

Parameters
object$tagtag name
object$enableenable style

Definition at line 313 of file oxpdf.php.

oxPDF::WriteHTML (   $html,
  $ln = true,
  $fill = false,
  $reseth = false,
  $cell = false,
  $align = '' 
)

Prints a cell (rectangular area) with optional borders, background color and html text string. The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.

Parameters
string$htmlhtml text to print. Default value: empty string.
int$lnIndicates where the current position should go after the call. Possible values are:
  • 0: to the right (or left for RTL language)
  • 1: to the beginning of the next line
  • 2: below
Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.
int$fillIndicates if the cell background must be painted (1) or transparent (0). Default value: 0.
boolean$resethif true reset the last cell height (default true).
float$cellif true, the cell extends up to the margin.
string$alignallows to center or align the text. Possible values are:
  • L : left align
  • C : center
  • R : right align
  • '' : empty string : left for LTR or right for RTL

public MultiCell()

See Also
Multicell(), writeHTML()

Definition at line 237 of file oxpdf.php.


The documentation for this class was generated from the following file: