wxRuby Documentation Home

Wx::HtmlEasyPrinting

This class provides very simple interface to printing
architecture. It allows you to print HTML documents using
only a few commands.

Note

Do not create this class on the stack only. You should create an instance on app
startup and use this instance for all printing operations. The reason is that
this class stores various settings in it.

Derived from

Object

Methods

HtmlEasyPrinting.new

HtmlEasyPrinting.new(%(arg-type)String% name = “Printing”, Window parentWindow = nil)

Constructor.

Parameters

HtmlEasyPrinting#preview_file

Boolean preview_file(%(arg-type)String% htmlfile)

Preview HTML file.

Returns false in case of error — call
Printer#get_last_error to get detailed
information about the kind of the error.

HtmlEasyPrinting#preview_text

Boolean preview_text(%(arg-type)String% htmltext, String basepath = ’’)

Preview HTML text (not file!).

Returns false in case of error — call
Printer#get_last_error to get detailed
information about the kind of the error.

Parameters

HtmlEasyPrinting#print_file

Boolean print_file(%(arg-type)String% htmlfile)

Print HTML file.

Returns false in case of error — call
Printer#get_last_error to get detailed
information about the kind of the error.

HtmlEasyPrinting#print_text

Boolean print_text(%(arg-type)String% htmltext, String basepath = ’’)

Print HTML text (not file!).

Returns false in case of error — call
Printer#get_last_error to get detailed
information about the kind of the error.

Parameters

HtmlEasyPrinting#page_setup

page_setup()

Display page setup dialog and allows the user to modify settings.

HtmlEasyPrinting#set_fonts

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

Sets fonts. See HtmlWindow#set_fonts for
detailed description.

HtmlEasyPrinting#set_header

set_header(%(arg-type)String% header, Integer page = Wx::PAGE_ALL)

Sets the page header to the text header. The header can contain HTML
markup. It can also include placeholders, wrapped in the @ sign,
which be will replaced on each page.

The page parameter can be used to control which set of pages the
header is set for. It can be one of the constants Wx::PAGE_ODD, Wx::PAGE_EVEN or Wx::PAGE_ALL.

HtmlEasyPrinting#set_footer

set_footer(%(arg-type)String% footer, Integer page = Wx::PAGE_ALL)

Sets the page footer to the text footer. The footer can contain HTML
markup. It can also include placeholders, wrapped in the @ sign,
which be will replaced on each page.

The page parameter can be used to control which set of pages the
footer is set for. It can be one of the constants Wx::PAGE_ODD,
Wx::PAGE_EVEN or Wx::PAGE_ALL.

HtmlEasyPrinting#get_print_data

PrintData get_print_data()

Returns the PrintData instance used by this class. You can
set its parameters (using its set_xxx methods).

HtmlEasyPrinting#get_page_setup_data

PageSetupDialogData get_page_setup_data()

Returns the PageSetupDialogData instance used by
this class. You can set its parameters (using its set_xxx methods).

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