\correspondence

An extension of FPDF to generate personalized correspondence PDFs

Summary

Methods
Properties
Constants
_()
__construct()
SetLangauge()
SetContact()
CorrespondenceHeader()
_putinfo()
$contact
$language
HEAD_RED
HEAD_GREEN
HEAD_BLUE
No protected methods found
$translations
N/A
No private methods found
No private properties found
N/A

Constants

HEAD_RED

HEAD_RED

If you'd want, you could change these constants to encode an RGB colour for headings in your PDFs

HEAD_GREEN

HEAD_GREEN

HEAD_BLUE

HEAD_BLUE

Properties

$contact

$contact : 

Type

— Holds the contact this correspondence will be sent to

$language

$language : 

Type

— Holds the contact this correspondence will be sent to

$translations

$translations : 

Array holding the translations

Type

Methods

_()

_(string  $key) : string

Translate a string

Parameters

string $key

The string to translate

Returns

string —

The translated string

__construct()

__construct(string  $orientation = 'P', string  $unit = 'mm', string  $size = 'A4') 

Create a new PDF

Parameters

string $orientation

See the FPDF class specs

string $unit

See the FPDF class specs

string $size

See the FPDF class specs

SetLangauge()

SetLangauge(string  $lang) 

Set the language of the correspondence (used to translate stuff)

Parameters

string $lang

The language, two letter code ('en', 'nl', ...)

SetContact()

SetContact(\contact  $contact) 

Set the contact to whom this correspondence will be sent (used for the address)

Parameters

\contact $contact

The contact

CorrespondenceHeader()

CorrespondenceHeader() 

Makes a header with your details and the address of the contact

_putinfo()

_putinfo() 

Put PDF information