## wxHtmlPrintout

This class serves as printout class for HTML documents.

Derived from

wxPrintout

Include files

<wx/html/htmprint.h>

Members

wxHtmlPrintout::wxHtmlPrintout
wxHtmlPrintout::SetFooter
wxHtmlPrintout::SetHeader
wxHtmlPrintout::SetHtmlFile
wxHtmlPrintout::SetHtmlText
wxHtmlPrintout::SetMargins

### wxHtmlPrintout::wxHtmlPrintout

wxHtmlPrintout(const wxString& title = "Printout")

Constructor.

### wxHtmlPrintout::SetFooter

void SetFooter(const wxString& footer, int pg = wxPAGE_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 wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.

### wxHtmlPrintout::SetHeader

void SetHeader(const wxString& header, int pg = wxPAGE_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 wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.

### wxHtmlPrintout::SetHtmlFile

void SetHtmlFile(const wxString& 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.

### wxHtmlPrintout::SetHtmlText

void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool 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 wxFileSystem for detailed explanation)

### wxHtmlPrintout::SetMargins

void SetMargins(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