FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Pdf Class Reference
Inheritance diagram for Pdf:
Component Thing

Public Member Functions

 createDomPdf ($html, $filename=null, $paper=null, $orientation=null, $options=null)
 Create a PDF file using DomPdf. More...
 
 createWebKit ($html, $filename=null, $paper=null, $orientation=null, $options=null)
 Create a PDF file using WebKit. More...
 
 create ($html, $filename=null, $paper=null, $orientation=null, $options=null)
 Create a PDF file using the default back-end. More...
 
- Public Member Functions inherited from Component
 __construct ($fred, $config=null)
 
 __destruct ()
 
 clientConfig ()
 Public configuration. More...
 
 config ($key, $default=null)
 Retrieve a config value. More...
 
 ping ()
 Ping function. More...
 
 filemtime ($filename)
 Filemtime with session cache. More...
 
 component ($name)
 Get a component (local or default). More...
 
 components (... $names)
 Get multiple components in an array. More...
 
- Public Member Functions inherited from Thing
 propertyExists ($property)
 Check if a property exists (public or published). More...
 
 constants ($prefix=null)
 Return all constants. More...
 
 get ($key)
 Get one or more properties. More...
 
 set ($key, $value=null)
 Set one or more properties. More...
 
 __get ($key)
 
 __set ($key, $value)
 

Data Fields

const ORIENTATION_PORTRAIT = 'portrait'
 
const ORIENTATION_LANDSCAPE = 'landscape'
 
const PAPER_A0 = 'a0'
 
const PAPER_A1 = 'a1'
 
const PAPER_A2 = 'a2'
 
const PAPER_A3 = 'a3'
 
const PAPER_A4 = 'a4'
 
const PAPER_A5 = 'a5'
 
const PAPER_LETTER = 'letter'
 
const PAPER_LEGAL = 'legal'
 
 $defaultBackEnd = 'domPdf'
 
 $paper = self::PAPER_A4
 Default paper size. More...
 
 $orientation = self::ORIENTATION_PORTRAIT
 Default paper orientation. More...
 
 $webKitHtmlToPdfPath = null
 wkHTMLtoPDF command-line, with placeholders voor [options] [source] en [target]. More...
 
- Data Fields inherited from Component
 $filemtimeTtl = 0
 
- Data Fields inherited from Thing
const HIDDEN = 0
 Property is hidden. More...
 
const READABLE = 1
 Property is readable. More...
 
const WRITEABLE = 2
 Property is writeable. More...
 
const READWRITE = 3
 Property is readable and writeable. More...
 

Protected Member Functions

 getBackEnds ()
 
 getDomPdf ()
 
- Protected Member Functions inherited from Component
 init ()
 
 done ()
 
 getSession ()
 
- Protected Member Functions inherited from Thing
 publish ($property, $visibility=self::READABLE)
 Publish a property (or hide it again). More...
 
 configure ($config)
 Configure the object. More...
 
 _get ($key)
 Default getter if no specific setter is defined, and the property is also not published (readable). More...
 
 _set ($key, $value)
 Default setter if no specific setter is defined, and the property is also not published (writeable). More...
 

Protected Attributes

 $_backEnds = null
 
 $_domPdf = null
 
- Protected Attributes inherited from Component
 $_fred = null
 
 $_config = null
 
 $_name = null
 
 $_components = []
 Local components (key = component name, value = component). More...
 
 $_session = null
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Detailed Description

Definition at line 5 of file Pdf.php.

Member Function Documentation

◆ create()

create (   $html,
  $filename = null,
  $paper = null,
  $orientation = null,
  $options = null 
)

Create a PDF file using the default back-end.

Parameters
string$htmlHTML presentation of content.
string$filenameTarget file (empty = return data).
string$paperPaper size (see PAPER_* constants; empty = default).
string$orientationPaper orientation (see ORIENTATION_* constants; empty = default).
array$optionsExtra options (back-end specific).
Returns
mixed Data if no filename given, otherwise filesize (false on error).

Definition at line 65 of file Pdf.php.

◆ createDomPdf()

createDomPdf (   $html,
  $filename = null,
  $paper = null,
  $orientation = null,
  $options = null 
)

Create a PDF file using DomPdf.

See also
create()

Definition at line 32 of file Pdf.php.

◆ createWebKit()

createWebKit (   $html,
  $filename = null,
  $paper = null,
  $orientation = null,
  $options = null 
)

Create a PDF file using WebKit.

See also
create()

Definition at line 43 of file Pdf.php.

◆ getBackEnds()

getBackEnds ( )
protected

Definition at line 69 of file Pdf.php.

◆ getDomPdf()

getDomPdf ( )
protected

Definition at line 78 of file Pdf.php.

Field Documentation

◆ $_backEnds

$_backEnds = null
protected

Definition at line 25 of file Pdf.php.

◆ $_domPdf

$_domPdf = null
protected

Definition at line 26 of file Pdf.php.

◆ $defaultBackEnd

$defaultBackEnd = 'domPdf'

Definition at line 19 of file Pdf.php.

◆ $orientation

$orientation = self::ORIENTATION_PORTRAIT

Default paper orientation.

Definition at line 21 of file Pdf.php.

◆ $paper

$paper = self::PAPER_A4

Default paper size.

Definition at line 20 of file Pdf.php.

◆ $webKitHtmlToPdfPath

$webKitHtmlToPdfPath = null

wkHTMLtoPDF command-line, with placeholders voor [options] [source] en [target].

Definition at line 23 of file Pdf.php.

◆ ORIENTATION_LANDSCAPE

const ORIENTATION_LANDSCAPE = 'landscape'

Definition at line 8 of file Pdf.php.

◆ ORIENTATION_PORTRAIT

const ORIENTATION_PORTRAIT = 'portrait'

Definition at line 7 of file Pdf.php.

◆ PAPER_A0

const PAPER_A0 = 'a0'

Definition at line 10 of file Pdf.php.

◆ PAPER_A1

const PAPER_A1 = 'a1'

Definition at line 11 of file Pdf.php.

◆ PAPER_A2

const PAPER_A2 = 'a2'

Definition at line 12 of file Pdf.php.

◆ PAPER_A3

const PAPER_A3 = 'a3'

Definition at line 13 of file Pdf.php.

◆ PAPER_A4

const PAPER_A4 = 'a4'

Definition at line 14 of file Pdf.php.

◆ PAPER_A5

const PAPER_A5 = 'a5'

Definition at line 15 of file Pdf.php.

◆ PAPER_LEGAL

const PAPER_LEGAL = 'legal'

Definition at line 17 of file Pdf.php.

◆ PAPER_LETTER

const PAPER_LETTER = 'letter'

Definition at line 16 of file Pdf.php.


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