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.
Customizing the pdf-Page via the Constant Editor¶
You can set several options on a per-template basis with the Constant Editor. These options will result in parameters used by the htmltopdf conversion. The following parameters can be set:
Property
landscape
Data type
boolean
Description
Set this to true if you want to generate the page in landscape mode
Default
False
Property
top
Data type
string
Description
Specifies the top margin in mm.
Default
13
Property
bottom
Data type
string
Description
Specifies the bottom margin in mm.
Default
13
Property
left
Data type
string
Description
Specifies the left margin in mm.
Default
13
Property
right
Data type
string
Description
Specifies the right margin in mm.
Default
13
Property
string_search[1-4]
Data type
string
Description
Using this parameter together with string_replace you can remove/replace certain parts of your html-file prior to passing it to the html2pdf conversion. One example is to remove the “Back” link in the recipe extension. You can do this (when using english language) with
string_search1 = “<A href="javascript:history.go(-1);">Back</A>”
and string_replace1 = “”
You can actually use string_search[5-n] as long as they are all set
Default
Empty
Property
string_replace[1-4]
Data type
string
Description
See string_search[1-4]
Default
Empty
Property
regexp_search[1-4]
Data type
string
Description
The same as string_search, but for regular expressions. The search and replace parameters must be valid regular expressions that will be passed to preg_replace.
You can actually use regexp_search[5-n] as long as they are all set
Default
Empty
Property
regexp_replace[1-4]
Data type
string
Description
See regexp_search[1-4]
Default
Empty