quexmlpdf

Extends \pdf

A TCPDF based class to produce queXF compatible questionnaire PDF files and banding description XML from queXML

author

Adam Zammit adam.zammit@acspri.org.au

copyright

(c) 2010 Australian Consortium for Social and Political Research Incorporated (ACSPRI)

since 2010-09-02
link

http://www.acspri.org.au/software

link

http://quexml.sourceforge.net

link

http://quexf.sourceforge.net

package

Default

Methods

Initialize and configure TCPDF with the settings in our config file

__construct() 
inherited

Override of the acceptPageBreak function

AcceptPageBreak() 

Allow our page handling function to know that a page break has occured

$return bool Returns false so no page break is automatically issued

Add answer to PDF

addAnswer( $sQuestion,  $sResponse,  $bReplaceExpressions = true,  $bAllowBreakPage = false) : void
inherited

Arguments

$sQuestion

  • Question field text array

$sResponse

  • Answer field text array

$bReplaceExpressions

  • 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

  • Allow break cell in two pages

Add a box to the page layout system

addBox(integer $tlx, integer $tly, integer $brx, integer $bry, string $value = "", string $label = "") 

Arguments

$tlx

integer

Top left X

$tly

integer

Top left Y

$brx

integer

Bottom right X

$bry

integer

Bottom right Y

$value

string

Optional, defaults to "".

$label

string

Optional, defaults to "".

Add a box group to the page layout system

addBoxGroup(integer $type, string $varname, string $label = "", integer $width = 1) 

VALUES(0, 'Temporary'); VALUES(1, 'Single choice'); VALUES(2, 'Multiple choice'); VALUES(3, 'Text'); VALUES(4, 'Number'); VALUES(5, 'Barcode'); VALUES(6, 'Long text');

author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-02

Arguments

$type

integer

The type of box group for verification purposes

$varname

string

The variable name

$label

string

The label for the box group Optional, defaults to "".

$width

integer

The width of this group Optional, defaults to 1.

Add a new box group which is a copy of the previous one (if exists)

addBoxGroupCopyPrevious() 
author

Adam Zammit adam.zammit@acspri.org.au

since 2012-03-26

Add GID text to PDF

addGidAnswer( $sGroupName, string $sGroupDescription,  $bAllowBreakPage = false) : void
inherited

Arguments

$sGroupName

  • Group name

$sGroupDescription

string

  • Group description

$bAllowBreakPage

  • Allow break cell in two pages

Add header to pdf

addHeader( $aPdfLanguageSettings,  $sSiteName,  $sDefaultHeaderString) : void
inherited

Arguments

$aPdfLanguageSettings

  • Pdf language settings

$sSiteName

  • LimeSurvey site name (header and metadata)

$sDefaultHeaderString

  • TCPDF header string

Add a new section to the page

addSection(string $desc = 'queXMLPDF Section',  $title = false, string $info = false) 

Arguments

$desc

string

The description of this section

$title

$info

string

Information for this section

Add title to pdf

addTitle( $sTitle,  $sSubtitle = "") : void
inherited

Arguments

$sTitle

  • Title

$sSubtitle

  • Subtitle

Create a queXML PDF document based on an array that is structured like a queXML document

create(array $questionnaire) 

sections (title, text, info) questions (title, text, varname, helptext, helptextafter) responses (varname) subquestion (text, varname) response (type, width, text, rotate) categories (text, value)

Arguments

$questionnaire

array

The questionnaire in the array format above

Create a question that may have multiple response groups

createQuestion(array $question) 

questions (title, text, specifier, helptext, helptextafter) responses (varname) subquestions subquestion(text, varname) response (type, width, text, rotate) categories category(text, value, skipto, other)

see \create

Arguments

$question

array

The questions portion of the array

Converts a queXML file to the array format required for the create function

createqueXML(string $quexml) : array
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-08
see \create

Arguments

$quexml

string

The queXML file

Response

array

An array readable by create

delete_html

delete_html( $text) 
inherited

Arguments

$text

Draw X number of cells at the current X Y position

drawCells(integer $cells, string $string) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-08

Arguments

$cells

integer

The number of text cells to draw

$string

string

A string to draw if set

Draw a horizontal response box with possible eye guides and arrows

drawHorizontalResponseBox(integer $x, integer $y, string $position = 'only', boolean $downarrow = false, boolean $rightarrow = false, boolean $smallwidth = false, boolean $filled = false) 

Arguments

$x

integer

The x position of the box area (top left)

$y

integer

The y position of the box area (top left)

$position

string

What position the box is in for the eye guides

$downarrow

boolean

Draw a down arrow?

$rightarrow

boolean

Draw an arrow to the right?

$smallwidth

boolean

Whether or not to use the small width

$filled

boolean

Whether or not to have the box pre-filled

Draw the questionnaire info specified

drawInfo( $info) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2011-12-21

Arguments

$info

Draw a large empty box for writing in text

drawLongText(mixed $width, boolean|string $defaultvalue = false, boolean|string $text = false) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-02

Arguments

$width

mixed

The "width" of the box. This relates to the number of "lines" high

$defaultvalue

boolean|string

The default text to print in the box (if any)

$text

boolean|string

The text to display above the box (if any)

Draw a barcode as a "question"

drawMatrixBarcode(string $subquestions, string $type) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2012-06-22

Arguments

$subquestions

string

$type

string

Draw a horizontal table of text boxes

drawMatrixTextHorizontal(array $subquestions, integer $width, string|boolean $parenttext = false, integer $bgtype = 3, string|boolean $responsegrouplabel = false) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-08

Arguments

$subquestions

array

The subquestions

$width

integer

The width

$parenttext

string|boolean

The question text of the parent or false if not specified

$bgtype

integer

The type of the box group (defaults to 3 - text)

$responsegrouplabel

string|boolean

The label for this response group or false if not specified

Draw text responses line by line

drawMatrixTextVertical(array $subquestions, integer $width, string|boolean $parenttext = false, integer $bgtype = 3, string|boolean $responsegrouplabel = false, string|boolean $split = 'notset') 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-02

Arguments

$subquestions

array

The subquestions containing text and varname

$width

integer

The width of the text element

$parenttext

string|boolean

The question text of the parent or false if not specified

$bgtype

integer

The box group type (default is 3 - text)

$responsegrouplabel

string|boolean

The label for this response group or false if not specified

$split

string|boolean

Allow splitting this over multiple pages. 'notset' means leave default. Otherwise force setting

Draw multiple VAS items

drawMatrixVas(array $subquestions, string|boolean $parenttext = false, string $labelleft, string $labelright, string|boolean $split = 'notset') 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-20

Arguments

$subquestions

array

The subquestions containing text and varname

$parenttext

string|boolean

The question text of the parent or false if not specified

$labelleft

string

The left hand side label

$labelright

string

The right hand side label

$split

string|boolean

Allow splitting this over multiple pages. 'notset' means leave default. Otherwise force setting

Draw an "other" box

drawOther(array $other) : \TODO
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-05-01

Arguments

$other

array

An array continaing varname,text,width,defaultvalue

Response

\TODO

Draw the header of a question (question title, text and help text if any)

drawQuestionHead(string $title, string $text, string|boolean $help = false, string|boolean $specifier = false) 

Arguments

$title

string

The question title (number)

$text

string

The question text (can be HTML)

$help

string|boolean

The question help text or false if none (can be HTML)

$specifier

string|boolean

The question specifier text or false if none (can be HTML)

Draw a horizontal table of respones including "eye guides"

drawSingleChoiceHorizontal(array $categories, array $subquestions = array(array('text' => '')), string|boolean $parenttext = false, string|boolean $responsegrouplabel = false, string|boolean $split = "notset") 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-08

Arguments

$categories

array

The response categories

$subquestions

array

The subquestions if any

$parenttext

string|boolean

The question text of the parent or false if not specified

$responsegrouplabel

string|boolean

The label for this response group or false if not specified

$split

string|boolean

Allow splitting this over multiple pages. 'notset' means leave default. Otherwise force setting

Draw the head of a single choice horizontal table of responses

drawSingleChoiceHorizontalHead(array $categories, string|boolean $responsegrouplabel = false) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2012-06-05

Arguments

$categories

array

The response categories

$responsegrouplabel

string|boolean

The label for this response group or false if not specified

Draw a vertical table of single choice responses including "eye guides"

drawSingleChoiceVertical(array $categories, array $subquestions = array(array('text' => '')), string|boolean $parenttext = false, string|boolean $split = 'notset') 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-02

Arguments

$categories

array

An array containing the category text, value, skipto and other

$subquestions

array

An array containing the subquestions if any

$parenttext

string|boolean

The question text of the parent or false if not specified

$split

string|boolean

Allow splitting this over multiple pages. 'notset' means leave default. Otherwise force setting

Draw the head of a single choice vertical table of responses

drawSingleChoiceVerticalHead(array $subquestions) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-24

Arguments

$subquestions

array

The subquestions

Draw vertical questions separately instead of in a matrix

drawSingleChoiceVerticalSeparate(array $categories, array $subquestions, string|boolean $parenttext, string|boolean $help, string|boolean $split = 'notset') 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-07-30

Arguments

$categories

array

An array containing the category text, value, skipto and other

$subquestions

array

An array containing the subquestions if any

$parenttext

string|boolean

The question text of the parent or false if not specified

$help

string|boolean

Help text if any for the responses

$split

string|boolean

Allow splitting this over multiple pages. 'notset' means leave default. Otherwise force setting

Draw a text response

drawText(string $text, integer $width, boolean|string $defaultvalue = false) 

Arguments

$text

string

The text label if any (can be HTML)

$width

integer

The number of boxes to draw

$defaultvalue

boolean|string

The default text to include or false if none

Draw a VAS

drawVas(string $text, string $labelleft, string $labelright, boolean $heading = true) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-20

Arguments

$text

string

The text of this item

$labelleft

string

The left hand side label

$labelright

string

The right hand side label

$heading

boolean

Whether to draw a heading or not

Draw a vertical response box with possible eye guides and arrows

drawVerticalResponseBox(integer $x, integer $y, string $position = 'only', boolean $downarrow = false, boolean $rightarrow = false, boolean $filled = false) 

Arguments

$x

integer

The x position of the box area (top left)

$y

integer

The y position of the box area (top left)

$position

string

What position the box is in for the eye guides

$downarrow

boolean

Draw a down arrow?

$rightarrow

boolean

Draw an arrow to the right?

$filled

boolean

Whether or not to have the box pre-filled

Creates a Table with equal cell width.

equalTable( $array,  $modulo = 1) : void
inherited

Arguments

$array

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

$modulo

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

Export the settings/styles set in XML

exportStyleXML() 
author

Adam Zammit adam.zammit@acspri.org.au

since 2015-06-18

Make sure to fill the remaining columns on the last page

fillLastPageBackground() 
author

Adam Zammit adam.zammit@acspri.org.au

since 2012-05-31

Draw the background from the current Y position to the bottom of the page

fillPageBackground() 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-15

Get allow splitting

getAllowSplittingMatrixText() : boolean
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

boolean

Whether to allow or not

Get allow splitting

getAllowSplittingResponses() : boolean
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

boolean

Whether to allow or not

Get allow splitting

getAllowSplittingSingleChoiceHorizontal() : boolean
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

boolean

Whether to allow or not

Get allow splitting

getAllowSplittingSingleChoiceVertical() : boolean
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

boolean

Whether to allow or not

Get allow splitting

getAllowSplittingVas() : boolean
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

boolean

Whether to allow or not

Get background colour for a question

getBackgroundColourQuestion() : integer
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

integer

Background colour between 0 and 255

Get background colour for a section

getBackgroundColourSection() : integer
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

integer

Background colour between 0 and 255

The width of the writable column

getColumnWidth() : double
author

Adam Zammit adam.zammit@acspri.org.au

since 2012-05-30

Response

double

The width of the current column

The X coordinate of the start of the column

getColumnX() : double
author

Adam Zammit adam.zammit@acspri.org.au

since 2012-05-30

Response

double

The X coordinate of the start of the current column

Get whether to use corner boxes

getCornerBoxes() : boolean
author

Adam Zammit adam.zammit@acspri.org.au

since 2014-12-22

Response

boolean

whether to use corner boxes

Get whether to use corner lines

getCornerLines() : boolean
author

Adam Zammit adam.zammit@acspri.org.au

since 2014-12-22

Response

boolean

whether to use corner lines

Wrapper function for getCornerBoxes and getCornerLines methods

getEdgeDetectionFormat() : string
author

A A D V S Abeysinghe venura@acspri.org.au

since 2015-07-08

Response

string

whether to use corner lines or boxes

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

getEqualWidth( $array) : \unknown_type
inherited

Good for static tables with equal value String-length

Arguments

$array

Response

\unknown_type

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

getFullWidth( $array) : array
inherited

..

Arguments

$array

Response

array

with column width

Export the layout as an XML file

getLayout() : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-20

Response

string

The XML layout in queXF Banding XML format

The width of the writeable page

getMainPageWidth() : double
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-02

Response

double

The width of the writeable page

getMainPageX

getMainPageX() 

getmaxwidth

getmaxwidth( $array) 
inherited

Arguments

$array

getminwidth

getminwidth( $array) 
inherited

Arguments

$array

Get page format

getPageFormat() : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2015-06-19

Response

string

page format

Get page orientation

getPageOrientation() : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2015-06-19

Response

string

page orientation

Get the questionnaire id

getQuestionnaireId() : integer
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-23

Response

integer

The questionnaire Id

Get the margin before questionnaire info

getQuestionnaireInfoMargin() : integer
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

integer

Height in mm between 0 and 100

Get the response label font sizes normal

getResponseLabelFontSize() : resource
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Response

resource

font size

Get the response label font size small

getResponseLabelFontSizeSmall() : resource
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Response

resource

font size

Get the response text font size

getResponseTextFontSize() : resource
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Response

resource

The response text font size

Get the section height

getSectionHeight() : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-07-30

Response

string

section height

Get vertical height of a single response item

getSingleResponseAreaHeight() : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

string

Height in mm between 1 and 100

Get the height of responses in a sub question matrix

getSingleResponseHorizontalHeight() : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Response

string

Height in mm between 1 and 100

Get the style without any HTML/etc formatting

getStyle() : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Response

string

The style without HTML or tabs

Override of TCPDF Header function to blank

Header() 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-20

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

headTable( $head,  $table,  $modulo = 1) : void
inherited

Arguments

$head

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

$table

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

$modulo

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

Import the settings/styles set from XML

importStyleXML( $xmlsettings) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2015-06-18

Arguments

$xmlsettings

Initialise TCPDF width some default values and embedded fonts

init() : \TODO
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-20

Response

\TODO

Create Answer PDF document, set metadata and set title

initAnswerPDF( $aSurveyInfo,  $aPdfLanguageSettings,  $sSiteName,  $sSurveyName,  $sDefaultHeaderString = '') : void
inherited

Arguments

$aSurveyInfo

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

$aPdfLanguageSettings

  • Pdf language settings

$sSiteName

  • LimeSurvey site name (header and metadata)

$sSurveyName

  • Survey name (header, metadata and title),

$sDefaultHeaderString

  • TCPDF header string

intopdf

intopdf(string $text,  $format = '') : void
inherited
deprecated

Arguments

$text

string

$format

Convert mm to pixels based on the set ppi (dpi)

mm2px(float $mm) : double

Arguments

$mm

float

Measurement in millimetres

Response

double

Pixel value as an integer

Create a new queXML PDF page

newPage( $init = false) 

Draw the barcode and page corners

Arguments

$init

Return capital letter(s) corresponding to the given number

numberToLetter(integer $number) : string
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-08

Arguments

$number

integer

Response

string

Letter(s) corresponding to the number

Set allow splitting

setAllowSplittingMatrixText(boolean $allow = true) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$allow

boolean

Whether to allow or not (default true)

Set allow splitting

setAllowSplittingResponses(boolean $allow = true) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$allow

boolean

Whether to allow or not (default true)

Set allow splitting

setAllowSplittingSingleChoiceHorizontal(boolean $allow = true) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$allow

boolean

Whether to allow or not (default true)

Set allow splitting

setAllowSplittingSingleChoiceVertical(boolean $allow = true) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$allow

boolean

Whether to allow or not (default true)

Set allow splitting

setAllowSplittingVas(boolean $allow = true) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$allow

boolean

Whether to allow or not (default true)

Set the background wash of the page

setBackground(string $type = 'empty') 
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-09-02

Arguments

$type

string

Optional, defaults to 'empty'.

Set background colour for a question

setBackgroundColourQuestion(integer $colour) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$colour

integer

Background colour between 0 and 255

Set background colour for a section

setBackgroundColourSection(integer $colour) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$colour

integer

Background colour between 0 and 255

Set _config for pdf

setConfig(mixed $tcpdf) : 
inherited
access

public

Arguments

$tcpdf

mixed

Response

Set whether to use corner boxes

setCornerBoxes() : \none
author

Adam Zammit adam.zammit@acspri.org.au

since 2014-12-22

Response

\none

Set whether to use corner lines

setCornerLines() : \none
author

Adam Zammit adam.zammit@acspri.org.au

since 2014-12-22

Response

\none

Set font size and style

setDefaultFont(integer $size = 12, string $style = '') : \TODO
author

Adam Zammit adam.zammit@acspri.org.au

since 2010-11-05

Arguments

$size

integer

Optional, defaults to 12

$style

string

Optional, defaults to ''.

Response

\TODO

Wrapper function for setCornerBoxes and setCornerLines methods

setEdgeDetectionFormat(\type $format) : \none
author

A A D V S Abeysinghe venura@acspri.org.au

since 2015-07-08

Arguments

$format

\type

lines or boxes

Response

\none

setLanguage

setLanguage( $language) 

Arguments

$language

Set page format

setPageFormat(string $format,  $orientation = '') 
author

Adam Zammit adam.zammit@acspri.org.au

since 2015-06-19

Arguments

$format

string

page format

$orientation

Set page orientation

setPageOrientation(string $orientation,  $autopagebreak = '',  $bottommargin = '') 
author

Adam Zammit adam.zammit@acspri.org.au

since 2015-06-19

Arguments

$orientation

string

page orientation

$autopagebreak

$bottommargin

Set margin before questionnare info

setQuestionnaireInfoMargin(integer $margin) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$margin

integer

between 0 and 100mm

Set the response label normal font size

setResponseLabelFontSize( $normalsize) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Arguments

$normalsize

Set the response label small font size

setResponseLabelFontSizeSmall( $smallsize) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Arguments

$smallsize

Set the response text font size

setResponseTextFontSize(integer $size) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Arguments

$size

integer

Set the minimum section height

setSectionHeight(integer $height) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-07-30

Arguments

$height

integer

The minimum height of a section

Set vertical height of a single response item

setSingleResponseAreaHeight(integer $height) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$height

integer

Height between 1 and 100mm

Set the height of responses items in a sub question matrix

setSingleResponseHorizontalHeight(integer $height) 
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-10-25

Arguments

$height

integer

Height between 1 and 100mm

Set the CSS styling of some questionnaire elements

setStyle(string $style) : \none
author

Adam Zammit adam.zammit@acspri.org.au

since 2013-04-10

Arguments

$style

string

The CSS styling of some questionnire elements

Response

\none

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

tablehead( $array) : void
inherited

Arguments

$array

Creates a table using the full width of page

tableintopdf( $array,  $modulo = 1) : void
inherited

Arguments

$array

Table array( 0=> array("td", "td", "td"), 1=> array("td", "td", "td"))

$modulo

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

Writes a big title in the page + description

titleintopdf( $title,  $description = '') : void
inherited

Arguments

$title

$description

Return the length of the longest word

wordLength(mixed $txt) : integer
author

Adam Zammit adam.zammit@acspri.org.au

since 2012-03-30

Arguments

$txt

mixed

Response

integer

Length of longest word

write_out

write_out( $name) 
inherited

Arguments

$name

Constants

Define an inch in MM

INCH_IN_MM
const

float Defaults to 25.4

Properties

Language for translation

language : 

Type(s)

Pixels per inch of exported document

ppi : integer
var

Defaults to 300.

Type(s)

integer

Whether a page break has occured Should be a private var but crash occurs on PHP 5.1.6, see Limesurvey Bug 5824

pageBreakOccured : boolean
var

Type(s)

boolean

Corner border (the number of mm between the edge of the page and the start of the document)

cornerBorder : integer
var

Defaults to 15.

since

Type(s)

integer

The length in MM of a corner line

cornerLength : mixed
var

Defaults to 20.

since

Type(s)

mixed

The width in MM of a corner line

cornerWidth : mixed
var

Defaults to 0.5.

since

Type(s)

mixed

The width in MM of a corner box 4.57mm is approx 54 pixels at 300dpi

cornerBoxWidth : float
var

Defaults to 4.57

since

Type(s)

float

The TCPDF barcode type

barcodeType : boolean
var

Defaults to 'I25'.

since
see

Type(s)

boolean

The distance between the right hand page border and the end of the barcode in MM

barcodeMarginX : boolean
var

Defaults to 23.

since

Type(s)

boolean

Y position of barcode in mm

barcodeY : boolean
var

Defaults to 6.

since

Type(s)

boolean

Width of the barcode in mm

barcodeW : boolean
var

Defaults to 49.

since

Type(s)

boolean

Height of the barcode in mm

barcodeH : boolean
var

Defaults to 6.

since

Type(s)

boolean

The questionnaire ID of this form

questionnaireId : mixed
var

Defaults to 1.

since

Type(s)

mixed

The length of a the id portion barcode

idLength : integer
var

Defaults to 6.

since
see

Type(s)

integer

The length of the page portion of the barcode

pageLength : mixed
var

Defaults to 2.

since
see

Type(s)

mixed

width of the question title column in MM

questionTitleWidth : mixed
var

Defaults to 14.

since

Type(s)

mixed

The suffix of the question title. i.e. A15. (the . is the suffix)

questionTitleSuffix : mixed
var

Defaults to ".".

since

Type(s)

mixed

Right margin of question text in MM

questionTextRightMargin : mixed
var

Defaults to 40.

since
see

Type(s)

mixed

Height of the border between questions in MM

questionBorderBottom : mixed
var

Defaults to 1.

since

Type(s)

mixed

Border after a help before directive

helpBeforeBorderBottom : mixed
var

Defaults to 3.

since

Type(s)

mixed

Border before a help before directive

helpBeforeBorderTop : mixed
var

Defaults to 3.

since

Type(s)

mixed

Width of the skip column area (where skip text is written)

skipColumnWidth : string
var

Defaults to 20.

since

Type(s)

string

The default style for the text of the questionnaire

style : string
var

Defaults to "".

since

Type(s)

string

Width of the area of each single response

singleResponseHorizontalHeight : string
var

Defaults to 10.

Defaults to 10.5.

since

Height of the area of a single response where displayed horizontally

Type(s)

string

The maximum number of lines of text to display in a horizontal single response before adding additional space

singleResponseHorizontalMaxLines : string
var

Defaults to 2.

since
see

Type(s)

string

Height of the are of each single response (includes guiding lines)

singleResponseAreaHeight : string
var

Defaults to 9.

since

Type(s)

string

Width of a single response box

singleResponseBoxWidth : string
var

Defaults to 5.

since

Type(s)

string

Height of a single response box

singleResponseBoxHeight : string
var

Defaults to 5.

since

Type(s)

string

Width of a response boxes border

singleResponseBoxBorder : string
var

Defaults to 0.1.

since

Type(s)

string

Length of the "eye guide" for a vertical response box

singleResponseBoxLineLength : string
var

Defaults to 1.

since

Type(s)

string

Vertical area taken up by a response box

singleResponseVerticalAreaWidth : string
var

Defaults to 15.

since

Type(s)

string

Vertical area taken up by a "small" vertical response area

singleResponseVerticalAreaWidthSmall : string
var

Defaults to 9.

since

Type(s)

string

Maximum number of horizontal boxes to display normally before shrinking horizontal area width

singleResponseHorizontalMax : integer
var

Defaults to 10.

since

Type(s)

integer

Allows all single choice horizontal arrays to be split over multiple pages/columns Can override with "split" attribute on "response" in queXML

allowSplittingSingleChoiceHorizontal : boolean
var

Defaults to false.

since

Type(s)

boolean

Allows all single choice vertical arrays to be split over multiple pages/columns Can override with "split" attribute on "response" in queXML

allowSplittingSingleChoiceVertical : boolean
var

Defaults to false.

since

Type(s)

boolean

If splitting is allowed for single choice vertical, only split if there is at least these many categories

minSplittingSingleChoiceVertical : integer
var

Defaults to 5.

since

Type(s)

integer

Allows multiple responses to the same question to be split over multiple pages/columns Can override with "split" attribute on "question" in queXML

allowSplittingResponses : boolean
var

Defaults to false.

since

Type(s)

boolean

Allows vertical matrix texts to be split over multiple pages/columns Can override with "split" attribute on "response" in queXML

allowSplittingMatrixText : boolean
var

Defaults to false.

since

Type(s)

boolean

Allows matrix VAS items to be split over multiple pages/columns Can override with "split" attribute on "response" in queXML

allowSplittingVas : boolean
var

Defaults to false.

since

Type(s)

boolean

The height of an arrow

arrowHeight : array
var

Defaults to 3.

since

Type(s)

array

The width of a text response box

textResponseWidth : mixed
var

Defaults to 6.

since

Type(s)

mixed

The border width of a text response box

textResponseBorder : mixed
var

Defaults to 0.15. Any less than this may produce printing problems

since

Type(s)

mixed

The height of a text response box

textResponseHeight : mixed
var

Defaults to 8.

since

Type(s)

mixed

The height of a pre-filled response barcode

barcodeResponseHeight : boolean
var

Defaults to 6.

since

Type(s)

boolean

The left hand margin of text responses to auto calculate responses per line (mm)

textResponseMarginX : mixed
var

Defaults to 13.

since

Type(s)

mixed

The left hand margin of text responses to auto calculated responses per line where the label should appear on the same line (mm)

labelTextResponsesSameLineMarginX : mixed
var

Defaults to 62.

since

Type(s)

mixed

The gap between multi line text responses

textResponseLineSpacing : mixed
var

Defaults to 1.

since

Type(s)

mixed

The vertical gap between subquestions in mm

subQuestionLineSpacing : string
var

Defaults to 2.

since

Type(s)

string

The multiplier from long text response width specified to the height in mm

longTextResponseHeightMultiplier : mixed
var

Defaults to 1.

since

Type(s)

mixed

Default number of characters to store in a long text field

longTextStorageWidth : integer
var

Default is 1024;

since

Type(s)

integer

The number of columns to display the sections/questions in on each page

columns : integer
var

Defaults to 1.

since

Type(s)

integer

The width of the border between columns

columnBorder : integer
var

Defaults to 1.

since

Type(s)

integer

The layout of the form for importing in to queXF

layout : array
var

Defaults to empty array

link

http://quexf.sourceforge.net/

Type(s)

array

Array to store section information for layout

section : array
var

Defaults to empty array

since

Type(s)

array

An array of key: skip target, value: last originating question that skips to the target

skipToRegistry : string
var

Defaults to array().

since

Type(s)

string

Page counter pointer (links to barcode id of page)

layoutCP : mixed
var

Defaults to "".

since

Type(s)

mixed

Section counter pointer

sectionCP : string
var

Defaults to 0.

since

Type(s)

string

Box group counter pointer

boxGroupCP : boolean
var

Defaults to 0.

since

Type(s)

boolean

Box counter pointer

boxCP : integer
var

Defaults to 0.

Type(s)

integer

Column counter pointer (current column)

columnCP : mixed
var

Defaults to 0.

since

Type(s)

mixed

Background colour of a question

backgroundColourQuestion : boolean
var

Defaults to array(220,220,220).

since

Type(s)

boolean

The bacground colour of a section

backgroundColourSection : boolean
var

Defaults to array(200,200,200).

since

Type(s)

boolean

Empty background colour

backgroundColourEmpty : boolean
var

Defaults to array(255,255,255).

since

Type(s)

boolean

The colour of a line/fill

lineColour : mixed
var

Defaults to array(0,0,0).

since

Type(s)

mixed

Text colour in grayscale

textColour : mixed
var

Defaults to 0.

since

Type(s)

mixed

The text to display before a skip

skipToText : string
var

Defaults to "Skip to ".

since

Type(s)

string

Should fonts be embedded in the document?

embedFonts : mixed
var

Defaults to true.

since

Type(s)

mixed

Height in MM of a VAS response

vasAreaHeight : mixed
var

Defaults to 8.

since

Type(s)

mixed

Width of a VAS line

vasLineWidth : mixed
var

Defaults to 0.5.

since

Type(s)

mixed

The width of a line for the default value

defaultValueLineWidth : double
var

Defaults to 0.5.

since

Type(s)

double

Height of the VAS ending lines in mm

vasHeight : mixed
var

Defaults to 4.

since

Type(s)

mixed

Length of the vas line itself

vasLength : mixed
var

Defaults to 100.

since

Type(s)

mixed

The number of increments stored on a vas line

vasIncrements : mixed
var

Defaults to 100.

since

Type(s)

mixed

The text to separate parent text and subquestion text

subQuestionTextSeparator : string
var

Defaults to " : ".

since

Type(s)

string

The top margin for questionnaireInfo section

questionnaireInfoMargin : mixed
var

Defaults to 5.

since

Type(s)

mixed

Height of a response label

responseLabelHeight : resource
var

Defaults to 10.

since

Type(s)

resource

Font size for response label

responseLabelFontSize : resource
var

Defaults to 8.

since

Type(s)

resource

A smaller font size for response labels where otherwise will break the line

responseLabelFontSizeSmall : resource
var

Defaults to 6.

since

Type(s)

resource

Reduce the font size of a response label if any words are longer than this

responseLabelSmallWordLength : resource
var

Defaults to 7.

since

Type(s)

resource

Font size for response text

responseTextFontSize : resource
var

Defaults to 10.

since

Type(s)

resource

Font size of the skip to text

skipToTextFontSize : string
var

Defaults to 8.

since

Type(s)

string

Default font

defaultFont : string
var

Defaults to 'freeserif'.

since

Type(s)

string

Height of a section break in mm

sectionHeight : string
var

Defaults to 18.

since

Type(s)

string

Use corner lines (default) or corner boxes

cornerLines : boolean
var

Defaults to true

since

Type(s)

boolean

TCPDF system constants that map to settings in our config file

cfg_constant_map : array
inherited
var
access

private

Type(s)

array

Settings from our APPPATH/config/tcpdf.php file

_config : array
inherited
var
access

private

Type(s)

array

Base font size for answer PDF export

_ibaseAnswerFontSize : integer
inherited
var
access

private

Type(s)

integer

Cell height for answer PDF export

_iCellHeight : integer
inherited
var
access

private

Type(s)

integer

Survey Information (preventing from passing to methods every time)

_aSurveyInfo : array
inherited
var
access

private

Type(s)

array