Back to Openproject

Timesheet PDF

docs/system-admin-guide/design/pdf-export-styles/timesheet/README.md

17.3.111.8 KB
Original Source

Timesheet PDF

This document describes the style settings format for the PDF Export styling file.

KeyDescriptionData type
pagePage settings
Properties to set the basic page settings
See Page settingsobject
page_logoPage logo
Styling for logo image in the page header.
See Page logoobject
page_headerPage headers
See Page headersobject
page_footerPage footers
See Page footersobject
page_headingPage heading
The main page title heading
See Page headingobject
coverCover page
Styling for the cover page of the PDF report export
See Cover pageobject

Cover page

Styling for the cover page of the PDF report export

Key: cover

Example:

yml
cover:
  header: {}
  footer: {}
  hero: {}
KeyDescriptionData type
headerCover page header
Styling for the cover page header
See Cover page headerobject
footerCover page footer
Styling for the cover page footer
See Cover page footerobject
heroCover page hero
Styling for the hero banner at the bottom at the cover page
See Cover page heroobject

Styling for the cover page footer of the PDF report export

Key: cover_footer

Example:

yml
footer:
  offset: 20
  size: 10
  color: 064e80
KeyDescriptionData type
offsetOffset position from page bottom
A number >= 0 and an optional unit
Example: 30number or string
See Units
See Font properties

Cover page header

Styling for the cover page header of the PDF report export

Key: cover_header

Example:

yml
header:
  logo_height: 25
  border: {}
KeyDescriptionData type
spacingMinimum spacing between logo and page header text
A number >= 0 and an optional unit
Example: 20number or string
See Units
offsetOffset position from page top
A number >= 0 and an optional unit
Example: 6.5number or string
See Units
logo_heightHeight of the logo in the page header
A number >= 0 and an optional unit
Example: 25number or string
See Units
borderCover page header
Styling for the cover page header
See Cover page header borderobject
See Font properties

Cover page header border

Styling for the cover page header border of the PDF report export

Key: cover_header_border

Example:

yml
border:
  color: d3dee3
  height: 1
  offset: 6
KeyDescriptionData type
spacingMinimum spacing between logo and page header text
A number >= 0 and an optional unit
Example: 20number or string
See Units
offsetOffset position from page top
A number >= 0 and an optional unit
Example: 6number or string
See Units
heightLine height of the border
A number >= 0 and an optional unit
Example: 25number or string
See Units
colorLine color of the border
A color in RRGGBB format
Example: F0F0F0string
See Font properties

Cover page hero

Styling for the hero banner at the bottom at the cover page

Key: cover_hero

Example:

yml
header:
  padding_right: 150
  padding_top: 120
  title: {}
  heading: {}
  subheading: {}
KeyDescriptionData type
padding_rightPadding right
Padding only on the right side of the hero banner
Examples: 10mm, 10number or string
See Units
padding_topPadding top
Padding only on the top side of the hero banner
Examples: 10mm, 10number or string
See Units
titleThe first block in the hero
See The first block in the heroobject
headingThe main block in the hero
See The main block in the heroobject
datesThe dates block in the hero
See The dates block in the heroobject
subheadingThe last block in the hero
See The last block in the heroobject

Font properties

Properties to set the font style

Key: font

Example:

yml
font: OpenSans
size: 10
character_spacing: 0
styles: []
color: '000000'
leading: 2
KeyDescriptionData type
fontstring
sizeA number >= 0 and an optional unit
Examples: 10mm, 10number or string
See Units
character_spacingA number >= 0 and an optional unit
Examples: 10mm, 10number or string
See Units
leadingA number >= 0 and an optional unit
Examples: 10mm, 10number or string
See Units
colorColor
A color in RRGGBB format
Example: F0F0F0string
stylesExample: [bold]
Valid values:
bold, italic, underline, strikethrough, superscript, subscriptarray of string

Margin properties

Properties to set margins

Key: margin

Example:

yml
margin: 10mm
margin_top: 15mm
KeyDescriptionData type
marginMargin
One value for margin on all sides
Examples: 10mm, 10number or string
See Units
margin_leftMargin left
Margin only on the left side
Examples: 10mm, 10number or string
See Units
margin_rightMargin right
Margin only on the right side
Examples: 10mm, 10number or string
See Units
margin_topMargin top
Margin only on the top side
Examples: 10mm, 10number or string
See Units
margin_bottomMargin bottom
Margin only on the bottom side
Examples: 10mm, 10number or string
See Units

Page footers

Key: page_footer

Example:

yml
page_footer:
  offset: -30
  size: 8
KeyDescriptionData type
offsetOffset position from page bottom
A positive or negative number and an optional unit
Example: -30number or string
See Units
spacingMinimum spacing between different page footers
A number >= 0 and an optional unit
Example: 8number or string
See Units
See Font properties

Page headers

Key: page_header

Example:

yml
page_header:
  align: left
  offset: 20
  size: 8
KeyDescriptionData type
alignAlignment
How the element should be aligned
Example: center
Valid values:
left, center, rightstring
offsetOffset position from page top
A positive or negative number and an optional unit
Example: -30number or string
See Units
See Font properties

Page heading

The main page title heading

Key: page_heading

Example:

yml
page_heading:
  size: 14
  styles:
    - bold
  margin_bottom: 10
KeyDescriptionData type
See Font properties
See Margin properties

Styling for logo image in the page header.

Key: page_logo

Example:

yml
page_logo:
  height: 20
  align: right
KeyDescriptionData type
heightHeight of the image
A number >= 0 and an optional unit
Examples: 10mm, 10number or string
See Units
alignAlignment
How the element should be aligned
Example: center
Valid values:
left, center, rightstring
offsetOffset position from page top
A positive or negative number and an optional unit
Example: -30number or string
See Units

Page settings

Properties to set the basic page settings

Key: page

Example:

yml
page:
  page_size: EXECUTIVE
  margin_top: 60
  margin_bottom: 60
  margin_left: 36
  margin_right: 36
  page_break_threshold: 200
  link_color: 175A8E
KeyDescriptionData type
link_colorLink color
Set the color of clickable links
Example: F0F0F0string
page_layoutPage layout
The layout of a page
Example: portrait
Valid values:
portrait, landscapestring
page_sizePage size
The size of a page
Example: EXECUTIVE
Valid values:
EXECUTIVE, TABLOID, LETTER, LEGAL, FOLIO, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, RA0, RA1, RA2, RA3, RA4, SRA0, SRA1, SRA2, SRA3, SRA4, 4A0, 2A0string
page_break_thresholdPage break threshold
If there is a new section, start a new page if space less than the threshold is available
Examples: 10mm, 10number or string
See Units
Default font settings
See Font properties
Page margins
See Margin properties

The dates block in the hero

Key: dates

Example:

yml
heading:
  spacing: 10
  max_height: 20
  size: 32
  color: 414d5f
  styles:
    - bold
KeyDescriptionData type
max_heightMaximum height of the block
A number >= 0 and an optional unit
Example: 30number or string
See Units
spacingMinimum spacing between dates and subheading
A number >= 0 and an optional unit
Example: 10number or string
See Units
See Font properties

The first block in the hero

Key: title

Example:

yml
title:
  max_height: 30
  spacing: 10
  font: SpaceMono
  size: 10
  color: 414d5f
KeyDescriptionData type
spacingMinimum spacing between title and heading
A number >= 0 and an optional unit
Example: 10number or string
See Units
max_heightMaximum height of the block
A number >= 0 and an optional unit
Example: 30number or string
See Units
See Font properties

The last block in the hero

Key: subheading

Example:

yml
subheading:
  max_height: 30
  size: 10
  color: 414d5f
  styles:
    - italic
KeyDescriptionData type
max_heightMaximum height of the block
A number >= 0 and an optional unit
Example: 30number or string
See Units
See Font properties

The main block in the hero

Key: heading

Example:

yml
heading:
  spacing: 10
  size: 32
  color: 414d5f
  styles:
    - bold
KeyDescriptionData type
spacingMinimum spacing between heading and subheading
A number >= 0 and an optional unit
Example: 10number or string
See Units
See Font properties

Units

available units are

mm - Millimeter, cm - Centimeter, dm - Decimeter, m - Meter

in - Inch, ft - Feet, yr - Yard

pt - Postscript point (default if no unit is used)