TypoScript Reference

Settings inheritance

To avoid redundancy there is an inheritance structure within the settings. There are basically three levels top down:

  1. plugin.tx_pdfviewhelpers.settings.document|page|generalText: The top level are global settings for document, page and generalText (all textual output).

  2. plugin.tx_pdfviewhelpers.settings.headline|text|list: Headline, text and list inherit settings from generalText. All the settings from generalText may be overwritten here with specific settings.

  3. Fluid ViewHelper attributes: The bottom level are Fluid ViewHelper attributes. All TypoScript settings may be overwritten using Fluid ViewHelper attributes with the same name. e.g:

{namespace pdf=Bithost\Pdfviewhelpers\ViewHelpers}

<pdf:document outputDestination="I" title="Bithost Example">
        <pdf:page autoPageBreak="1">
                <pdf:headline color="#333">Different color</pdf:headline>
        </pdf:page>
</pdf:document>

Properties in plugin.tx_pdfviewhelpers.settings

Property

Data type

Default

config.class

t3tsref:data-type-string

Bithost\Pdfviewhelpers\Model\BasePDF

config.disableCache

t3tsref:data-type-boolean

1

config.exitAfterPdfContentOutput

t3tsref:data-type-boolean

0

config.jpgQuality

t3tsref:data-type-integer

100

config.sRGBMode

t3tsref:data-type-boolean

0

config.allowedImageTypes

Array

See static TypoScript template

config.fonts.subset

t3tsref:data-type-boolean

1

config.fonts.addTTFFont

Array

See static TypoScript template

config.fonts.outputPath

t3tsref:data-type-string

typo3temp/pdfviewhelpers/fonts/

document.title

t3tsref:data-type-string

document.subject

t3tsref:data-type-string

document.author

t3tsref:data-type-string

document.keywords

t3tsref:data-type-string

document.creator

t3tsref:data-type-string

TYPO3 EXT:pdfviewhelpers

document.outputDestination

t3tsref:data-type-string

inline

document.outputPath

t3tsref:data-type-string

document.pdf

document.sourceFile

t3tsref:data-type-string

document.unit

t3tsref:data-type-string

mm

document.unicode

t3tsref:data-type-boolean

1

document.encoding

t3tsref:data-type-string

UTF-8

document.pdfa

t3tsref:data-type-boolean

0

document.pdfua

t3tsref:data-type-boolean

0

document.language

t3tsref:data-type-string

ger

document.hyphenFile

t3tsref:data-type-string

hyph-de-ch-1901.tex

page.autoPageBreak

t3tsref:data-type-boolean

0

page.margin

Array

{top: 15, right: 15, bottom: 15, left: 15}

page.importPage

t3tsref:data-type-integer

page.importPageOnAutomaticPageBreak

t3tsref:data-type-boolean

1

page.orientation

t3tsref:data-type-string

portrait

page.format

t3tsref:data-type-string

A4

page.keepMargins

t3tsref:data-type-boolean

0

page.tableOfContentPage

t3tsref:data-type-boolean

0

header.posY

t3tsref:data-type-integer

5

footer.posY

t3tsref:data-type-integer

-10

avoidPageBreakInside.breakIfImpossibleToAvoid

t3tsref:data-type-boolean

0

generalText.trim

t3tsref:data-type-boolean

1

generalText.removeDoubleWhitespace

t3tsref:data-type-boolean

1

generalText.color

t3tsref:data-type-string

#000

generalText.fontFamily

t3tsref:data-type-string

helvetica

generalText.fontSize

t3tsref:data-type-integer

11

generalText.fontStyle

t3tsref:data-type-string

regular

generalText.lineHeight

t3tsref:data-type-float

1.25

generalText.characterSpacing

t3tsref:data-type-float

0

generalText.padding

Array

{top: 0, right: 0, bottom: 0, left: 0}

generalText.alignment

t3tsref:data-type-string

left

generalText.paragraphSpacing

t3tsref:data-type-integer

2

generalText.paragraphLineFeed

t3tsref:data-type-boolean

0

generalText.autoHyphenation

t3tsref:data-type-boolean

0

text.trim

t3tsref:data-type-boolean

See generalText

text.removeDoubleWhitespace

t3tsref:data-type-boolean

See generalText

text.color.

t3tsref:data-type-string

See generalText

text.fontFamily

t3tsref:data-type-string

See generalText

text.fontSize

t3tsref:data-type-integer

See generalText

text.fontStyle

t3tsref:data-type-string

See generalText

text.lineHeight

t3tsref:data-type-float

See generalText

text.characterSpacing

t3tsref:data-type-float

See generalText

text.padding

Array

See generalText

text.alignment

t3tsref:data-type-string

See generalText

text.paragraphSpacing

t3tsref:data-type-integer

See generalText

text.paragraphLineFeed

t3tsref:data-type-boolean

See generalText

text.autoHyphenation

t3tsref:data-type-boolean

See generalText

headline.trim

t3tsref:data-type-boolean

See generalText

headline.removeDoubleWhitespace

t3tsref:data-type-boolean

See generalText

headline.color

t3tsref:data-type-string

See generalText

headline.fontFamily

t3tsref:data-type-string

See generalText

headline.fontSize

t3tsref:data-type-integer

See generalText

headline.fontStyle

t3tsref:data-type-string

See generalText

headline.lineHeight

t3tsref:data-type-float

See generalText

headline.characterSpacing

t3tsref:data-type-float

See generalText

headline.padding

Array

{top: 6, bottom: 3}

headline.alignment

t3tsref:data-type-string

See generalText

headline.paragraphSpacing

t3tsref:data-type-integer

See generalText

headline.paragraphLineFeed

t3tsref:data-type-boolean

See generalText

headline.autoHyphenation

t3tsref:data-type-boolean

See generalText

headline.addToTableOfContent

t3tsref:data-type-boolean

0

headline.tableOfContentLevel

t3tsref:data-type-integer

0

list.trim

t3tsref:data-type-boolean

See generalText

list.removeDoubleWhitespace

t3tsref:data-type-boolean

See generalText

list.color

t3tsref:data-type-string

See generalText

list.fontFamily

t3tsref:data-type-string

See generalText

list.fontSize

t3tsref:data-type-integer

See generalText

list.fontStyle

t3tsref:data-type-string

See generalText

list.lineHeight

t3tsref:data-type-float

See generalText

list.characterSpacing

t3tsref:data-type-float

See generalText

list.paragraphLineFeed

t3tsref:data-type-boolean

See generalText

list.padding

Array

{bottom: 2, left: 1.5}

list.alignment

t3tsref:data-type-string

left

list.bulletColor

t3tsref:data-type-string

#000

list.bulletImageSrc

t3tsref:data-type-string

list.bulletSize

t3tsref:data-type-float

1.5

list.autoHyphenation

t3tsref:data-type-boolean

See generalText

image.alignment

t3tsref:data-type-string

left

image.fitOnPage

t3tsref:data-type-boolean

1

image.padding

Array

{bottom: 2}

image.processingInstructions

Array

{}

html.autoHyphenation

t3tsref:data-type-boolean

See generalText

html.styleSheet

t3tsref:data-type-string

html.padding

Array

{top: 0, right: 0, bottom: 2, left: 0}

graphics.line.padding

Array

{top: 4, right: 0, bottom: 5, left: 0}

graphics.line.style

Array

{width: 0.25, color: #000}

tableOfContent.page

t3tsref:data-type-integer

1

tableOfContent.numbersFont

t3tsref:data-type-string

tableOfContent.filter

t3tsref:data-type-string

.

tableOfContent.name

t3tsref:data-type-string

tableOfContent.htmlMode

t3tsref:data-type-boolean

0

tableOfContent.fontFamily

t3tsref:data-type-string

tableOfContent.fontSize

t3tsref:data-type-float

tableOfContent.lineHeight

t3tsref:data-type-float

tableOfContent.characterSpacing

t3tsref:data-type-float

tableOfContent.padding

Array

{bottom: 2}

htmlBookmarkTemplate.level

t3tsref:data-type-integer

0

htmlBookmarkTemplate.sanitizeWhitespace

t3tsref:data-type-boolean

1

bookmark.level

t3tsref:data-type-integer

0

bookmark.fontStyle

t3tsref:data-type-string

bookmark.color

t3tsref:data-type-string

Property details

config.class

plugin.tx_pdfviewhelpers.settings.config.class = t3tsref:data-type-string

Decides which PHP class should be used as TCPDF object. You can easily provide your own class in order to render custom header and footers or to customize TCPDF in any way. Your provided class must inherit from Bithost\Pdfviewhelpers\Model\BasePDF.

config.disableCache

plugin.tx_pdfviewhelpers.settings.config.disableCache = t3tsref:data-type-boolean

Decides whether the TYPO3 frontend cache will be disabled or not.

config.exitAfterPdfContentOutput

plugin.tx_pdfviewhelpers.settings.config.exitAfterPdfContentOutput = t3tsref:data-type-boolean

Decides whether the PHP method exit is called after the PDF content has been sent to the browser. This might solve issues when additional content is echoed and appended to the PDF document. However it might also lead to other unexpected behaviour so be careful.

config.jpgQuality

plugin.tx_pdfviewhelpers.settings.config.jpgQuality = t3tsref:data-type-integer

JpgQuality being used, values from 0 - 100.

config.sRGBMode

plugin.tx_pdfviewhelpers.settings.config.sRGBMode = t3tsref:data-type-boolean

Enable sRGBMode, see TCPDF documentation for further information.

config.allowedImageTypes

plugin.tx_pdfviewhelpers.settings.config.allowedImageTypes = Array

Mapping of TCPDF image functions to their corresponding image file extensions.

config.fonts.subset

plugin.tx_pdfviewhelpers.settings.config.fonts.subset = t3tsref:data-type-boolean

Decides whether to subset the used fonts or not. When this is set to true it is not possible to edit the generated PDF if the font is not present in the users system, but the file size gets smaller.

config.fonts.addTTFFont

plugin.tx_pdfviewhelpers.settings.config.fonts.addTTFFont = Array

Possibility to add custom fonts, please have a look at the dedicated chapter Custom Fonts.

config.fonts.outputPath

plugin.tx_pdfviewhelpers.settings.config.fonts.outputPath = t3tsref:data-type-string

Path to directory where font files of custom fonts should be stored. This folder can safely be deleted and will automatically be re/created if it does not exist.

document.title

plugin.tx_pdfviewhelpers.settings.document.title = t3tsref:data-type-string

The title of the generated PDF document.

document.subject

plugin.tx_pdfviewhelpers.settings.document.subject = t3tsref:data-type-string

The subject of the generated PDF document.

document.author

plugin.tx_pdfviewhelpers.settings.document.author = t3tsref:data-type-string

The author of the generated PDF document.

document.keywords

plugin.tx_pdfviewhelpers.settings.document.keywords = t3tsref:data-type-string

A comma separated list of keywords for the generated PDF document.

document.creator

plugin.tx_pdfviewhelpers.settings.document.creator = t3tsref:data-type-string

The creator of the generated PDF document.

document.outputDestination

plugin.tx_pdfviewhelpers.settings.document.outputDestination = t3tsref:data-type-string

The TCPDF output destination for the PDF. Possible values are:

outputDestination

Description

I / inline

Sending the PDF inline to the browser.

D / download

Sending the PDF as immediate file download.

F / file

Saving the PDF to the specified outputPath.

FI / file-inline

Saving the PDF to the specified outputPath and sending it inline to the browser.

FD / file-download

Saving the PDF to the specified outputPath and sending it as immediate file download.

E / email

Return the PDF as base64 mime multi-part email attachment (RFC 2045).

S / string

Return the PDF as string.

document.outputPath

plugin.tx_pdfviewhelpers.settings.document.outputPath = t3tsref:data-type-string

The TCPDF output path of the document. If you are saving the file to filesystem this is a relative path from the webroot directory e.g. fileadmin/pdfviewhelpers/projectXY.pdf. If you are sending it inline or as file download it is simply the name of the document e.g. projectXY.pdf.

document.sourceFile

plugin.tx_pdfviewhelpers.settings.document.sourceFile = t3tsref:data-type-string

The sourceFile is a the path to a PDF document you want to use as a template (see also page.importPage).

document.unit

plugin.tx_pdfviewhelpers.settings.document.unit = t3tsref:data-type-string

The measurement unit used. Possible values are pt, mm, cm and in.

document.unicode

plugin.tx_pdfviewhelpers.settings.document.unicode = t3tsref:data-type-boolean

Determines whether the input text is unicode or not.

document.encoding

plugin.tx_pdfviewhelpers.settings.document.encoding = t3tsref:data-type-string

Charset encoding (used only when converting back html entities).

document.pdfa

plugin.tx_pdfviewhelpers.settings.document.pdfa = t3tsref:data-type-boolean

Sets the document to PDF/A mode if true.

document.pdfua

plugin.tx_pdfviewhelpers.settings.document.pdfua = t3tsref:data-type-boolean

Enables experimental support for PDF/UA. Please note that this feature is very much incomplete, feel free to contribute any improvements on this!

document.language

plugin.tx_pdfviewhelpers.settings.document.language = t3tsref:data-type-string

Decides which language settings are used from TCPDF. All possible language codes can be found in Resources/Private/tcpdf/examples/lang/.

document.hyphenFile

plugin.tx_pdfviewhelpers.settings.document.hyphenFile = t3tsref:data-type-string

The name of the hyphen file used for the automatic hyphenation. This needs to be set according to the language of your document. All possible values can be found in the directory pdfviewhelpers/Resources/Private/Hyphenation/.

Example values are: hyph-de-1996.tex, hyph-en-gb.tex, hyph-nl.tex, hyph-fr.tex

page.autoPageBreak

plugin.tx_pdfviewhelpers.settings.page.autoPageBreak = t3tsref:data-type-boolean

Decides whether TCPDF uses auto page break or not. You can always add a new page by adding a new <pdf:page> tag to your template.

page.margin

plugin.tx_pdfviewhelpers.settings.page.margin = Array

An array of the margin for each page. The default unit is millimeters.

page.importPage

plugin.tx_pdfviewhelpers.settings.page.importPage = t3tsref:data-type-integer

Specifies which page should be used as template for the current page. Must be used together with document.sourceFile.

page.importPageOnAutomaticPageBreak

plugin.tx_pdfviewhelpers.settings.page.importPageOnAutomaticPageBreak = t3tsref:data-type-boolean

Determines whether a PDF template that is used on a page is also rendered when an automatic page break occurs.

page.orientation

plugin.tx_pdfviewhelpers.settings.page.orientation = t3tsref:data-type-string

Defines the orientation of the current page and the following pages. Possible values are P / portrait and L / landscape.

page.format

plugin.tx_pdfviewhelpers.settings.page.format = t3tsref:data-type-string

Defines the format of the current page. Possible values are e.g. A0 - A12, to see all possible values you have to check \TCPDF_STATIC::$page_formats.

page.keepMargins

plugin.tx_pdfviewhelpers.settings.page.keepMargins = t3tsref:data-type-string

If true overwrites the default page margins with the current margins.

page.tableOfContentPage

plugin.tx_pdfviewhelpers.settings.page.tableOfContentPage = t3tsref:data-type-string

If true the page will be rendered as a table of content page, e.g. it can be moved to the front.

header.posY

plugin.tx_pdfviewhelpers.settings.header.posY = t3tsref:data-type-integer

Defines the header position relative to the top of the page.

avoidPageBreakInside.breakIfImpossibleToAvoid

plugin.tx_pdfviewhelpers.settings.avoidPageBreakInside.breakIfImpossibleToAvoid = t3tsref:data-type-boolean

If set to true this ViewHelper inserts a page break even if the content does not fit on one page, meaning a page break is unavoidable.

generalText.trim

plugin.tx_pdfviewhelpers.settings.generalText.trim = t3tsref:data-type-boolean

If set to true leading and trailing spaces or tabs are trimmed.

generalText.removeDoubleWhitespace

plugin.tx_pdfviewhelpers.settings.generalText.removeDoubleWhitespace = t3tsref:data-type-boolean

If set to true double spaces within text elements are removed.

generalText.color

plugin.tx_pdfviewhelpers.settings.generalText.color = t3tsref:data-type-string

The text color as hex value, possible syntax are: #000 or #000000

generalText.fontFamily

plugin.tx_pdfviewhelpers.settings.generalText.fontFamily = t3tsref:data-type-string

The font family being used. A list of available fonts and a configuration to add your own fonts is available in the chapter custom fonts.

generalText.fontSize

plugin.tx_pdfviewhelpers.settings.generalText.fontSize = t3tsref:data-type-integer

The font size being used.

generalText.fontStyle

plugin.tx_pdfviewhelpers.settings.generalText.fontStyle = t3tsref:data-type-string

The font style being used. Possible values are: R / regular, B / bold, I / italic, U / underline

generalText.lineHeight

plugin.tx_pdfviewhelpers.settings.generalText.lineHeight = t3tsref:data-type-float

Sets the line height with respect to the font size.

generalText.characterSpacing

plugin.tx_pdfviewhelpers.settings.generalText.characterSpacing = t3tsref:data-type-float

Sets the spacing between individual characters

generalText.padding

plugin.tx_pdfviewhelpers.settings.generalText.padding = Array

An array of the padding for each text element. The default unit is millimeters.

generalText.alignment

plugin.tx_pdfviewhelpers.settings.generalText.alignment = t3tsref:data-type-string

Possible values are: L / left, C / center, R / right, J / justify

generalText.paragraphSpacing

plugin.tx_pdfviewhelpers.settings.generalText.paragraphSpacing = t3tsref:data-type-integer

Defines the spacing of paragraphs separated by new lines.

generalText.paragraphLineFeed

plugin.tx_pdfviewhelpers.settings.generalText.paragraphLineFeed = t3tsref:data-type-boolean

Add new lines char after each paragraph (in justified text keeps left align the last line of each paragraph).

generalText.autoHyphenation

plugin.tx_pdfviewhelpers.settings.generalText.autoHyphenation = t3tsref:data-type-boolean

A boolean value indicating whether to use TCPDF's automatic hyphenation or not. You can also add soft hyphens yourself to your text with "&shy;". If you use automatic hyphenation please make sure that you configure "config.hyphenFile" to match your language.

headline.addToTableOfContent

plugin.tx_pdfviewhelpers.settings.generalText.addToTableOfContent = t3tsref:data-type-boolean

If true the headline will be added to the table of content.

headline.tableOfContentLevel

plugin.tx_pdfviewhelpers.settings.generalText.tableOfContentLevel = t3tsref:data-type-integer

Indicating the level of the headline in the table of content. Starting from 0 as top level, 1 for second, 2 for third level and so on.

list.bulletColor

plugin.tx_pdfviewhelpers.settings.list.bulletColor = t3tsref:data-type-string

The color of the bullet used as hex value, possible syntax are: #000 or #000000

list.bulletImageSrc

plugin.tx_pdfviewhelpers.settings.list.bulletImageSrc = t3tsref:data-type-string

The path to an image that should be used as bullet.

list.bulletSize

plugin.tx_pdfviewhelpers.settings.list.bulletSize = t3tsref:data-type-float

The size of the bullet as floating point value.

image.alignment

plugin.tx_pdfviewhelpers.settings.image.alignment = t3tsref:data-type-string

Possible values are: L / left, C / center, R / right

image.fitOnPage

plugin.tx_pdfviewhelpers.settings.image.fitOnPage = t3tsref:data-type-boolean

If true the image will automatically be rescaled to fit on page.

image.padding

plugin.tx_pdfviewhelpers.settings.image.padding = Array

The padding around the image.

image.processingInstructions

plugin.tx_pdfviewhelpers.settings.image.processingInstructions = Array

An array of processing instructions that is passed to the method ImageService->applyProcessingInstructions. A possible configuration looks like this:

processingInstructions {
        width =
        height =
        maxHeight =
        minWidth =
        maxWidth = 200
        minHeight =
        crop {
                custom_crop {
                        cropArea {
                                width = 0.5
                                height = 0.5
                                x = 0
                                y = 0
                        }
                }
        }
        cropVariant = custom_crop
}

html.styleSheet

plugin.tx_pdfviewhelpers.settings.html.styleSheet = t3tsref:data-type-string

The path to a style sheet being used in the HtmlViewHelper. The can be provided relative to the webroot directory, e.g. "fileadmin/pdf_style.css".

html.padding

plugin.tx_pdfviewhelpers.settings.html.padding = Array

The padding around the html element.

graphics.line.padding

plugin.tx_pdfviewhelpers.settings.graphics.line.padding = Array

Defines the padding around a line. The default unit is millimeters.

graphics.line.style

plugin.tx_pdfviewhelpers.settings.graphics.line.style = Array

An array defining line styles, please see the https://tcpdf.org/examples/example_012/ for all possible values.

tableOfContent.page

plugin.tx_pdfviewhelpers.settings.tableOfContent.page = t3tsref:data-type-integer

Indicates at what place in the document the table of content will be rendered.

tableOfContent.numbersFont

plugin.tx_pdfviewhelpers.settings.tableOfContent.numbersFont = t3tsref:data-type-string

The font used to render the numbers. Note that a monospaced font must be used in order to guarantee correct alignment.

tableOfContent.filter

plugin.tx_pdfviewhelpers.settings.tableOfContent.filter = t3tsref:data-type-string

The filter used to fill up the space between the entry title and the page number.

tableOfContent.name

plugin.tx_pdfviewhelpers.settings.tableOfContent.name = t3tsref:data-type-string

The name used for the table of content bookmark.

tableOfContent.htmlMode

plugin.tx_pdfviewhelpers.settings.tableOfContent.htmlMode = t3tsref:data-type-boolean

If true the table of content is rendered in HTML mode.

tableOfContent.fontFamily

plugin.tx_pdfviewhelpers.settings.tableOfContent.fontFamily = t3tsref:data-type-string

The fontFamily for the entries. Also see See generalText.

tableOfContent.fontSize

plugin.tx_pdfviewhelpers.settings.tableOfContent.fontSize = t3tsref:data-type-float

The fontSize of the top most level. Also see See generalText.

tableOfContent.lineHeight

plugin.tx_pdfviewhelpers.settings.tableOfContent.lineHeight = t3tsref:data-type-float

The lineHeight used for the table content entries. Also see See generalText.

tableOfContent.characterSpacing

plugin.tx_pdfviewhelpers.settings.tableOfContent.characterSpacing = t3tsref:data-type-float

The characterSpacing used for the table content entries. Also see See generalText.

tableOfContent.padding

plugin.tx_pdfviewhelpers.settings.tableOfContent.padding = Array

The cell padding used for the table content entries.

htmlBookmarkTemplate.level

plugin.tx_pdfviewhelpers.settings.htmlBookmarkTemplate.level = t3tsref:data-type-integer

The bookmark entry level to which the HTML template should apply.

htmlBookmarkTemplate.sanitizeWhitespace

plugin.tx_pdfviewhelpers.settings.htmlBookmarkTemplate.sanitizeWhitespace = t3tsref:data-type-boolean

If true the input will be trimmed and whitespaces between HTML tags will be removed.

bookmark.level

plugin.tx_pdfviewhelpers.settings.bookmark.level = t3tsref:data-type-boolean

The table of content level for the bookmark.

bookmark.fontStyle

plugin.tx_pdfviewhelpers.settings.bookmark.fontStyle = t3tsref:data-type-boolean

The fontStyle this individual bookmark. Also see See generalText.

bookmark.color

plugin.tx_pdfviewhelpers.settings.bookmark.fontStyle = t3tsref:data-type-boolean

The fontStyle this individual bookmark. Also see See generalText.