pdf

Extends \TCPDF

Methods

Set _config for pdf

setConfig(mixed $tcpdf) 
access

public

Arguments

$tcpdf

mixed

Initialize and configure TCPDF with the settings in our config file

__construct() 

obsolete

intopdf(string $text, mixed $format = '') : \unknown_type

Arguments

$text

string

$format

mixed

Response

\unknown_type

obsolete

helptextintopdf(mixed $text) : \unknown_type

Arguments

$text

mixed

Response

\unknown_type

writes a big title in the page + description

titleintopdf(mixed $title, mixed $description = '') : \unknown_type

Arguments

$title

mixed

$description

mixed

Response

\unknown_type

Creates a Table with equal cell width and Bold text. Used as Head for equalTable()

tablehead($array) : \unknown_type

Arguments

$array

Response

\unknown_type

Creates a Table with equal cell width.

equalTable(mixed $array, mixed $modulo = 1) : \unknown_type

Arguments

$array

mixed

  • table array( 0=> array("td", "td", "td"), 1=> array("td", "td", "td"))

$modulo

mixed

  • fills each second row with a light-grey for better visibility. Default is on turn off with 0

Response

\unknown_type

creates a table using the full width of page

tableintopdf(mixed $array, mixed $modulo = 1) : \unknown_type

Arguments

$array

mixed

  • table array( 0=> array("td", "td", "td"), 1=> array("td", "td", "td"))

$modulo

mixed

  • fills each second row with a light-grey for better visibility. Default is off, turn on with 1

Response

\unknown_type

creates a table with a bold head using the full width of page

headTable(mixed $head, mixed $table, mixed $modulo = 1) : \unknown_type

Arguments

$head

mixed

  • head array( 0=> array("th", "th", "th"))

$table

mixed

  • table array( 0=> array("td", "td", "td"), 1=> array("td", "td", "td"))

$modulo

mixed

  • fills each second row with a light-grey for better visibility. Default is on, turn off with 0

Response

\unknown_type

getminwidth

getminwidth($array) 

Arguments

$array

getmaxwidth

getmaxwidth($array) 

Arguments

$array

Gets the width for columns in a table based on their Stringlength and the width of the page.

getFullWidth(mixed $array) : array

..

Arguments

$array

mixed

Response

array

with column width

gets the width for each column in tables, based on pagewidth and count of columns.

getEqualWidth(mixed $array) : \unknown_type

Good for static tables with equal value String-length

Arguments

$array

mixed

Response

\unknown_type

write_out

write_out($name) 

Arguments

$name

delete_html

delete_html($text) 

Arguments

$text

Create Answer PDF document, set metadata and set title

initAnswerPDF(mixed $aSurveyInfo, mixed $aPdfLanguageSettings, mixed $sSiteName, mixed $sSurveyName, mixed $sDefaultHeaderString = '') : \unknown_type

Arguments

$aSurveyInfo

mixed

  • Survey Information (preventing from passing to methods every time)

$aPdfLanguageSettings

mixed

  • Pdf language settings

$sSiteName

mixed

  • LimeSurvey site name (header and metadata)

$sSurveyName

mixed

  • Survey name (header, metadata and title),

$sDefaultHeaderString

mixed

  • TCPDF header string

Response

\unknown_type

Add title to pdf

addTitle(mixed $sTitle, mixed $sSubtitle = "") : \unknown_type

Arguments

$sTitle

mixed

  • Title

$sSubtitle

mixed

  • Subtitle

Response

\unknown_type

Add header to pdf

addHeader(mixed $aPdfLanguageSettings, mixed $sSiteName, mixed $sDefaultHeaderString) : \unknown_type

Arguments

$aPdfLanguageSettings

mixed

  • Pdf language settings

$sSiteName

mixed

  • LimeSurvey site name (header and metadata)

$sDefaultHeaderString

mixed

  • TCPDF header string

Response

\unknown_type

Add GID text to PDF

addGidAnswer(mixed $sGroupName, mixed $sGroupDescription, mixed $bAllowBreakPage = false) : \unknown_type

Arguments

$sGroupName

mixed

  • Group name

$sGroupDescription

mixed

  • Group description

$bAllowBreakPage

mixed

  • Allow break cell in two pages

Response

\unknown_type

Add answer to PDF

addAnswer(mixed $sQuestion, mixed $sResponse, mixed $bReplaceExpressions = true, mixed $bAllowBreakPage = false) : \unknown_type

Arguments

$sQuestion

mixed

  • Question field text array

$sResponse

mixed

  • Answer field text array

$bReplaceExpressions

mixed

  • Try to replace LimeSurvey Expressions. This is false when exporting answers PDF from admin GUI because we can not interpret expressions so just purify. TODO: Find a universal valid method to interpret expressions

$bAllowBreakPage

mixed

  • Allow break cell in two pages

Response

\unknown_type

Properties

TCPDF system constants that map to settings in our config file

cfg_constant_map : array
var
access

private

Type(s)

array

Settings from our APPPATH/config/tcpdf.php file

_config : array
var
access

private

Type(s)

array

Base font size for answer PDF export

_ibaseAnswerFontSize : int
var
access

private

Type(s)

int

Cell height for answer PDF export

_iCellHeight : int
var
access

private

Type(s)

int

Survey Information (preventing from passing to methods every time)

_aSurveyInfo : array
var
access

private

Type(s)

array