DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

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 string Bithost\Pdfviewhelpers\Model\BasePDF
config.disableCache boolean 1
config.exitAfterPdfContentOutput boolean 0
config.jpgQuality integer 100
config.sRGBMode boolean 0
config.allowedImageTypes Array See static TypoScript template
config.fonts.subset boolean 1
config.fonts.addTTFFont Array See static TypoScript template
document.title string  
document.subject string  
document.author string  
document.keywords string  
document.creator string TYPO3 EXT:pdfviewhelpers
document.outputDestination string inline
document.outputPath string document.pdf
document.sourceFile string  
document.unit string mm
document.unicode boolean 1
document.encoding string UTF-8
document.pdfa boolean 0
document.language string ger
document.hyphenFile string hyph-de-ch-1901.tex
page.autoPageBreak boolean 0
page.margin Array {top: 15, right: 15, bottom: 15, left: 15}
page.importPage integer  
page.importPageOnAutomaticPageBreak boolean 1
page.orientation string portrait
page.format string A4
page.keepMargins boolean 0
page.tableOfContentPage boolean 0
header.posY integer 5
footer.posY integer -10
avoidPageBreakInside.breakIfImpossibleToAvoid boolean 0
generalText.trim boolean 1
generalText.removeDoubleWhitespace boolean 1
generalText.color string #000
generalText.fontFamily string helvetica
generalText.fontSize integer 11
generalText.fontStyle string regular
generalText.lineHeight data-type-float 1.25
generalText.characterSpacing data-type-float 0
generalText.padding Array {top: 0, right: 0, bottom: 0, left: 0}
generalText.alignment string left
generalText.paragraphSpacing integer 2
generalText.paragraphLineFeed boolean 0
generalText.autoHyphenation boolean 0
text.trim boolean See generalText
text.removeDoubleWhitespace boolean See generalText
text.color. string See generalText
text.fontFamily string See generalText
text.fontSize integer See generalText
text.fontStyle string See generalText
text.lineHeight data-type-float See generalText
text.characterSpacing data-type-float See generalText
text.padding Array See generalText
text.alignment string See generalText
text.paragraphSpacing integer See generalText
text.paragraphLineFeed boolean See generalText
text.autoHyphenation boolean See generalText
headline.trim boolean See generalText
headline.removeDoubleWhitespace boolean See generalText
headline.color string See generalText
headline.fontFamily string See generalText
headline.fontSize integer See generalText
headline.fontStyle string See generalText
headline.lineHeight data-type-float See generalText
headline.characterSpacing data-type-float See generalText
headline.padding Array {top: 6, bottom: 3}
headline.alignment string See generalText
headline.paragraphSpacing integer See generalText
headline.paragraphLineFeed boolean See generalText
headline.autoHyphenation boolean See generalText
headline.addToTableOfContent boolean 0
headline.tableOfContentLevel integer 0
list.trim boolean See generalText
list.removeDoubleWhitespace boolean See generalText
list.color string See generalText
list.fontFamily string See generalText
list.fontSize integer See generalText
list.fontStyle string See generalText
list.lineHeight data-type-float See generalText
list.characterSpacing data-type-float See generalText
list.paragraphLineFeed boolean See generalText
list.padding Array {bottom: 2, left: 1.5}
list.alignment string left
list.bulletColor string #000
list.bulletImageSrc string  
list.bulletSize data-type-float 1.5
list.autoHyphenation boolean See generalText
image.alignment string left
image.padding Array {bottom: 2}
image.processingInstructions Array {}
html.autoHyphenation boolean See generalText
html.styleSheet 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 integer 1
tableOfContent.numbersFont string  
tableOfContent.filter string .
tableOfContent.name string  
tableOfContent.htmlMode boolean 0
tableOfContent.fontFamily string  
tableOfContent.fontSize data-type-float  
tableOfContent.lineHeight data-type-float  
tableOfContent.characterSpacing data-type-float  
tableOfContent.padding Array {bottom: 2}
htmlBookmarkTemplate.level integer 0
htmlBookmarkTemplate.sanitizeWhitespace boolean 1
bookmark.level integer 0
bookmark.fontStyle string  
bookmark.color string  

Property details

config.class

plugin.tx_pdfviewhelpers.settings.config.class = 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 = boolean

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

config.exitAfterPdfContentOutput

plugin.tx_pdfviewhelpers.settings.config.exitAfterPdfContentOutput = 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 = integer

JpgQuality being used, values from 0 - 100.

config.sRGBMode

plugin.tx_pdfviewhelpers.settings.config.sRGBMode = 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 = 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.

document.title

plugin.tx_pdfviewhelpers.settings.document.title = string

The title of the generated PDF document.

document.subject

plugin.tx_pdfviewhelpers.settings.document.subject = string

The subject of the generated PDF document.

document.author

plugin.tx_pdfviewhelpers.settings.document.author = string

The author of the generated PDF document.

document.keywords

plugin.tx_pdfviewhelpers.settings.document.keywords = string

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

document.creator

plugin.tx_pdfviewhelpers.settings.document.creator = string

The creator of the generated PDF document.

document.outputDestination

plugin.tx_pdfviewhelpers.settings.document.outputDestination = 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 = 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 = 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 = string

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

document.unicode

plugin.tx_pdfviewhelpers.settings.document.unicode = boolean

Determines whether the input text is unicode or not.

document.encoding

plugin.tx_pdfviewhelpers.settings.document.encoding = string

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

document.pdfa

plugin.tx_pdfviewhelpers.settings.document.pdfa = boolean

Sets the document to PDF/A mode if true.

document.language

plugin.tx_pdfviewhelpers.settings.document.language = 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 = 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 = 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 = 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 = 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 = 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 = 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 = string

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

page.tableOfContentPage

plugin.tx_pdfviewhelpers.settings.page.tableOfContentPage = 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 = integer

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

avoidPageBreakInside.breakIfImpossibleToAvoid

plugin.tx_pdfviewhelpers.settings.avoidPageBreakInside.breakIfImpossibleToAvoid = 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 = boolean

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

generalText.removeDoubleWhitespace

plugin.tx_pdfviewhelpers.settings.generalText.removeDoubleWhitespace = boolean

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

generalText.color

plugin.tx_pdfviewhelpers.settings.generalText.color = string

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

generalText.fontFamily

plugin.tx_pdfviewhelpers.settings.generalText.fontFamily = 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 = integer

The font size being used.

generalText.fontStyle

plugin.tx_pdfviewhelpers.settings.generalText.fontStyle = 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 = data-type-float

Sets the line height with respect to the font size.

generalText.characterSpacing

plugin.tx_pdfviewhelpers.settings.generalText.characterSpacing = 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 = string

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

generalText.paragraphSpacing

plugin.tx_pdfviewhelpers.settings.generalText.paragraphSpacing = integer

Defines the spacing of paragraphs separated by new lines.

generalText.paragraphLineFeed

plugin.tx_pdfviewhelpers.settings.generalText.paragraphLineFeed = 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 = 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 = boolean

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

headline.tableOfContentLevel

plugin.tx_pdfviewhelpers.settings.generalText.tableOfContentLevel = 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 = string

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

list.bulletImageSrc

plugin.tx_pdfviewhelpers.settings.list.bulletImageSrc = string

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

list.bulletSize

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

The size of the bullet as floating point value.

image.alignment

plugin.tx_pdfviewhelpers.settings.image.alignment = string

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

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 =
        cropVariant =
}

html.styleSheet

plugin.tx_pdfviewhelpers.settings.html.styleSheet = 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 = integer

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

tableOfContent.numbersFont

plugin.tx_pdfviewhelpers.settings.tableOfContent.numbersFont = 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 = 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 = string

The name used for the table of content bookmark.

tableOfContent.htmlMode

plugin.tx_pdfviewhelpers.settings.tableOfContent.htmlMode = boolean

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

tableOfContent.fontFamily

plugin.tx_pdfviewhelpers.settings.tableOfContent.fontFamily = string

The fontFamily for the entries. Also see See generalText.

tableOfContent.fontSize

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

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

tableOfContent.lineHeight

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

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

tableOfContent.characterSpacing

plugin.tx_pdfviewhelpers.settings.tableOfContent.characterSpacing = 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 = integer

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

htmlBookmarkTemplate.sanitizeWhitespace

plugin.tx_pdfviewhelpers.settings.htmlBookmarkTemplate.sanitizeWhitespace = boolean

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

bookmark.level

plugin.tx_pdfviewhelpers.settings.bookmark.level = boolean

The table of content level for the bookmark.

bookmark.fontStyle

plugin.tx_pdfviewhelpers.settings.bookmark.fontStyle = boolean

The fontStyle this individual bookmark. Also see See generalText.

bookmark.color

plugin.tx_pdfviewhelpers.settings.bookmark.fontStyle = boolean

The fontStyle this individual bookmark. Also see See generalText.