abstract class Hpdf::LetterDIN5008
- Hpdf::LetterDIN5008
- Hpdf::LetterDINA4
- Hpdf::Letter
- Hpdf::Page
- Reference
- Object
Overview
Standard layout defined in DIN5008. With sections for
- Heading area
- Address area
- Return address / remarks
- Postal address
- Information area
- Content area
- Footer area
Direct Known Subclasses
Defined in:
hpdf/letter.crConstant Summary
-
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 Method Summary
-
#content_rect : Rectangle
the rectangle for the content section
-
#debug_draw_boxes
draws boxes around all sections of the page for debugging purposes
-
#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.
-
#draw_infobox(font : String, font_size = Number, &)
draws the infobox section using the passed font and size.
-
#draw_marker(at : Number, width : Number)
draws a merker for page folding or whole making.
-
#draw_markers
draws markers for whole making and folding
-
#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.
- #font_cap_height : Number
-
#footer_rect : Rectangle
the rectangle where to place the footer information
-
#heading_rect : Rectangle
the rectangle for the header section
-
#information_rect : Rectangle
the rectangle for the information section
-
#page_info_rect : Rectangle
the rectangle where to place current page and number of pages information
-
#postal_address_rect : Rectangle
the rectangle for the address section
-
#remark_area_rect : Rectangle
the rectangle for address and other remarks
Instance methods inherited from class Hpdf::LetterDINA4
mm(mm : Number) : Number
mm
Instance methods inherited from class Hpdf::Page
arc(x : Number, y : Number, ray : Number, ang1 : Number, ang2 : Number)
arc,
begin_text
begin_text,
build(&)
build,
char_space : Float32
char_space,
char_space=(value : Number)
char_space=,
circle(x : Number, y : Number, ray : Number)
circle,
clip
clip,
close_path
close_path,
close_path_eofill_stroke
close_path_eofill_stroke,
close_path_fill_stroke
close_path_fill_stroke,
close_path_stroke
close_path_stroke,
cmyk_fill : CMYK
cmyk_fill,
cmyk_stroke : CMYK
cmyk_stroke,
concat(a : Number, b : Number, c : Number, d : Number, x : Number, y : Number)
concat,
context(&)
context,
create_destination : Destination
create_destination,
create_link_annotation(rect : Rectangle, dst : Destination) : LinkAnnotation
create_link_annotation,
create_text_annotation(rect : Rectangle, text : String, encoder : Encoder | Nil = nil) : TextAnnotation
create_text_annotation,
create_uri_link_annotation(rect : Rectangle, uri : String)
create_uri_link_annotation,
current_font : Font | Nil
current_font,
current_font_size : Float32
current_font_size,
current_pos : Point
current_pos,
current_text_pos : Point
current_text_pos,
curve_to(x1 : Number, y1 : Number, x2 : Number, y2 : Number, x3 : Number, y3 : Number)curve_to(p1 : Point, p2 : Point, p3 : Point) curve_to, curve_to2(x1 : Number, y1 : Number, x2 : Number, y2 : Number)
curve_to2(p1 : Point, p2 : Point) curve_to2, curve_to3(x1 : Number, y1 : Number, x2 : Number, y2 : Number)
curve_to3(p1 : Point, p2 : Point) curve_to3, dash dash, dpi=(dpi : Number) dpi=, draw_image(image : Image, x : Number, y : Number, width : Number, height : Number)
draw_image(image : Image, rect : Rectangle) draw_image, draw_rectangle(x : Number, y : Number, w : Number, h : Number, *, line_width lw : Number = 1)
draw_rectangle(rect : Rectangle, *, line_width lw = 1) draw_rectangle, end_path end_path, eoclip eoclip, eofill eofill, eofill_stroke eofill_stroke, execute_x_object(image : Image) execute_x_object, fill fill, fill_stroke fill_stroke, filling_color_space : ColorSpace filling_color_space, flat : Float32 flat, font : Hpdf::Font? font, g_mode g_mode, g_restore g_restore, g_save g_save, g_state_depth : Int32 g_state_depth, graphics_mode : GMode graphics_mode, gray_fill : Float32 gray_fill, gray_fill=(value : Number) gray_fill=, gray_stroke : Float32 gray_stroke, gray_stroke=(value : Number) gray_stroke=, height : Int32 height, height=(h : Number) height=, horizontal_scaling : Float32 horizontal_scaling, horizontal_scalling=(value : Number) horizontal_scalling=, line_cap : LineCap line_cap, line_cap=(line_cap : LineCap) line_cap=, line_join : LineJoin line_join, line_join=(line_join : LineJoin) line_join=, line_to(x : Number, y : Number)
line_to(p : Point) line_to, line_width : Float32 line_width, line_width=(line_width : Number) line_width=, measure_text(text : String, *, width : Number, word_wrap : Bool = true) : MeasuredText measure_text, measure_text_width(text : String) : MeasuredText measure_text_width, miter_limit : Float32 miter_limit, miter_limit=(limit : Number) miter_limit=, move_text_pos(x : Number, y : Number) move_text_pos, move_to(x : Number, y : Number)
move_to(p : Point) move_to, move_to_next_line move_to_next_line, page_move_text_pos2(x : Number, y : Number) page_move_text_pos2, path(x : Number, y : Number, &) path, rectangle(x : Number, y : Number, w : Number, h : Number)
rectangle(r : Rectangle) rectangle, reset_dash! reset_dash!, rgb_fill : RGB rgb_fill, rgb_stroke : RGB rgb_stroke, rotate=(angle : Number) rotate=, set_cmyk_fill(c : Number, m : Number, y : Number, k : Number) set_cmyk_fill, set_cmyk_stroke(c : Number, m : Number, y : Number, k : Number) set_cmyk_stroke, set_dash(pattern : Array(Number), *, phase = 0) set_dash, set_font_and_size(font : Hpdf::Font, size : Number)
set_font_and_size(font : String, size : Number) set_font_and_size, set_rgb_fill(r : Number, g : Number, b : Number) set_rgb_fill, set_rgb_stroke(r : Number, g : Number, b : Number) set_rgb_stroke, set_size(size : PageSizes, direction : PageDirection = PageDirection::Portrait) set_size, set_slide_show(style : TransitionStyle, disp_time : Number, trans_time : Number = 1) set_slide_show, set_text_matrix(a : Number, b : Number, c : Number, d : Number, x : Number, y : Number) set_text_matrix, show_text(text : String) show_text, show_text_next_line(text : String) show_text_next_line, show_text_next_line_ex(text : String, word_space : Number, char_space : Number) show_text_next_line_ex, stroke stroke, stroking_color_space : ColorSpace stroking_color_space, table(rect : Rectangle, line_width lw : Number = 1, spacing sp : Number = 0, fixed_row_height fwh : Number = 0, &)
table(*, x : Number, y : Number, width : Number, height : Number, line_width lw : Number = 1, fixed_row_height fwh : Number = 0, spacing sp : Number = 0, &) table, text(name = nil, size = nil, *, encoding enc : String = @encoding, &) text, text_end text_end, text_leading=(value : Number) text_leading=, text_out(x : Number | Symbol, y : Number | Symbol, text : String) text_out, text_rect(left : Number, top : Number, right : Number, bottom : Number, text : String, *, align : TextAlignment = TextAlignment::Left) : Number
text_rect(rect : Rectangle, text : String, *, align : TextAlignment = TextAlignment::Left) : Number text_rect, text_rendering_mode : TextRenderingMode text_rendering_mode, text_rendering_mode=(mode : TextRenderingMode) text_rendering_mode=, text_rise : Float32 text_rise, text_rise=(value : Number) text_rise=, text_width(text : String) : Float32 text_width, to_unsafe : LibHaru::Page to_unsafe, trans_matrix : TransMatrix trans_matrix, use_encoding(encoding : String, &) use_encoding, use_font(name, size, *, encoding enc : String | Nil = @encoding) use_font, width : Int32 width, width=(w : Number) width=, word_space : Float32 word_space, word_space=(value : Number) word_space=
Constructor methods inherited from class Hpdf::Page
new(page : LibHaru::Page, doc : Doc)
new
Instance methods inherited from module Hpdf::Helper
bool(val : Bool) : Int32
bool,
nilable_str(v : Pointer(UInt8)) : String | Nil
nilable_str,
real(val : Number) : LibHaru::Real
real,
uint(val : Number) : LibHaru::UInt
uint,
uint16(val : Number) : UInt16
uint16
Instance Method Detail
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.
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
draws a merker for page folding or whole making.
- at the position on the y axis
- width the width of the marker
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.
the rectangle where to place current page and number of pages information