wxRuby Documentation Home

# Wx::HtmlPrintout

This class serves as printout class for HTML documents.

## Derived from

Printout

## Methods

- HtmlPrintout.new
- HtmlPrintout#add_filter
- HtmlPrintout#set_fonts
- HtmlPrintout#set_footer
- HtmlPrintout#set_header
- HtmlPrintout#set_html_file
- HtmlPrintout#set_html_text
- HtmlPrintout#set_margins

### HtmlPrintout.new

HtmlPrintout.new(%(arg-type)String% title = “Printout”)

Constructor.

### HtmlPrintout#add_filter

add_filter(%(arg-type)HtmlFilter% filter)

Adds a filter to the static list of filters for HtmlPrintout. See HtmlFilter for
further information.

### HtmlPrintout#set_fonts

set_fonts(%(arg-type)String% normal_face, String fixed_face, Integer sizes = nil)

Sets fonts. See HtmlWindow#set_fonts for
detailed description.

### HtmlPrintout#set_footer

set_footer(%(arg-type)String% footer, Integer pg = PAGE_ALL)

Sets page footer.

#### Parameters

- footer HTML text to be used as footer. You can use macros in it:

- `PAGENUM` is replaced by page number
- `PAGESCNT` is replaced by total number of pages

- pg one of PAGE_ODD, PAGE_EVEN and PAGE_ALL constants.

### HtmlPrintout#set_header

set_header(%(arg-type)String% header, Integer pg = PAGE_ALL)

Sets page header.

#### Parameters

- header HTML text to be used as header. You can use macros in it:

- `PAGENUM` is replaced by page number
- `PAGESCNT` is replaced by total number of pages

- pg one of PAGE_ODD, PAGE_EVEN and PAGE_ALL constants.

### HtmlPrintout#set_html_file

set_html_file(%(arg-type)String% htmlfile)

Prepare the class for printing this HTML file. The file may be located on
any virtual file system or it may be normal file.

### HtmlPrintout#set_html_text

set_html_text(%(arg-type)String% html, String basepath = ’’, Boolean isdir = true)

Prepare the class for printing this HTML text.

#### Parameters

- html HTML text. (NOT file!)
- basepath base directory (html string would be stored there if it was in
  file). It is used to determine path for loading images, for example.
- isdir false if basepath is filename, true if it is directory name
  (see FileSystem for detailed explanation)

### HtmlPrintout#set_margins

set_margins(%(arg-type)Float% top = 25.2, Float bottom = 25.2, Float left = 25.2, Float right = 25.2, Float spaces = 5)

Sets margins in millimeters. Defaults to 1 inch for margins and 0.5cm for space
between text and header and/or footer

[This page automatically generated from the Textile source at 2023-06-09 00:45:36 +0000]