Hpdf::LetterDIN5008
Inherits Hpdf::LetterDINA4 / Hpdf::Letter / Hpdf::Page / Hpdf::Helper / Reference / Object
Standard layout defined in DIN5008. With sections for
- Heading area
- Address area
- Return address / remarks
- Postal address
- Information area
- Content area
- Footer area
Constants
ADDRESS_HEIGHT = 45.00
ADDRESS_LEFT = 20.00
ADDRESS_PADDING_LEFT = 5.00
ADDRESS_WIDTH = 85.00
CONTENT_BOTTOM = 35.00
CONTENT_HEIGHT = (DIN_A4_HEIGHT - CONTENT_BOTTOM) - CONTENT_TOP
CONTENT_LEFT = 25.00
CONTENT_RIGHT = 20.00
CONTENT_TOP = 103.46
CONTENT_WIDTH = (DIN_A4_WIDTH - CONTENT_LEFT) - CONTENT_RIGHT
FOLD_MARKER_LARGE = 105.00
FOLD_MARKER_SMALL = 87.00
INFOBOX_BOTTOM = 8.46
INFOBOX_LEFT = 125.00
INFOBOX_WIDTH = 75.00
NEXT_PAGE_SEP = 4.23
PAGE_INFO_BOTTOM = 23.00
POSTAL_HEIGHT = 27.30
REMARK_HEIGHT = 17.70
Instance methods
draw_address(*, company : String = "", salutation : String = "", name : String = "", street : String = "", place : String = "", country : String = "", gray : Number = 0)
draws the address as specified by the given fields. The order of the fields is:
- company (1)
- salutation (2)
- name (3)
- street (4)
- place (5)
- country (6)
Use gray to change the text color.
draw_infobox(font : String, font_size = Number, &)
draws the infobox section using the passed font and size.
- font the name of the font to use
- font_size the size of the font to use
draw_marker(at : Number, width : Number)
draws a merker for page folding or whole making.
- at the position on the y axis
- width the width of the marker
draw_remark_area(*, first : String = "", second : String = "", third : String = "", fourth : String = "", fifth : String = "", gray : Number = 0.5)
draws remarks on top of the address area. fifth is the last line of the remark area, first is the first line of the area. Use gray to change the text color.
font_cap_height
Source