Contents Up Previous Next

wxHtmlEasyPrinting

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

wxObject

Include files

<wx/html/htmprint.h>

Members

wxHtmlEasyPrinting::wxHtmlEasyPrinting
wxHtmlEasyPrinting::PreviewFile
wxHtmlEasyPrinting::PreviewText
wxHtmlEasyPrinting::PrintFile
wxHtmlEasyPrinting::PrintText
wxHtmlEasyPrinting::PrinterSetup
wxHtmlEasyPrinting::PageSetup
wxHtmlEasyPrinting::SetFonts
wxHtmlEasyPrinting::SetHeader
wxHtmlEasyPrinting::SetFooter
wxHtmlEasyPrinting::GetPrintData
wxHtmlEasyPrinting::GetPageSetupData


wxHtmlEasyPrinting::wxHtmlEasyPrinting

wxHtmlEasyPrinting(const wxString& name = "Printing", wxWindow* parentWindow = NULL)

Constructor.

Parameters

name

parentWindow


wxHtmlEasyPrinting::PreviewFile

bool PreviewFile(const wxString& htmlfile)

Preview HTML file.

Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error.


wxHtmlEasyPrinting::PreviewText

bool PreviewText(const wxString& htmltext, const wxString& basepath = wxEmptyString)

Preview HTML text (not file!).

Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error.

Parameters

htmltext

basepath


wxHtmlEasyPrinting::PrintFile

bool PrintFile(const wxString& htmlfile)

Print HTML file.

Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error.


wxHtmlEasyPrinting::PrintText

bool PrintText(const wxString& htmltext, const wxString& basepath = wxEmptyString)

Print HTML text (not file!).

Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error.

Parameters

htmltext

basepath


wxHtmlEasyPrinting::PrinterSetup

void PrinterSetup()

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


wxHtmlEasyPrinting::PageSetup

void PageSetup()

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


wxHtmlEasyPrinting::SetFonts

void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL)

Sets fonts. See wxHtmlWindow::SetFonts for detailed description.


wxHtmlEasyPrinting::SetHeader

void SetHeader(const wxString& header, int pg = wxPAGE_ALL)

Set page header.

Parameters

header

pg


wxHtmlEasyPrinting::SetFooter

void SetFooter(const wxString& footer, int pg = wxPAGE_ALL)

Set page footer.

Parameters

footer

pg


wxHtmlEasyPrinting::GetPrintData

wxPrintData* GetPrintData()

Returns pointer to wxPrintData instance used by this class. You can set its parameters (via SetXXXX methods).


wxHtmlEasyPrinting::GetPageSetupData

wxPageSetupDialogData* GetPageSetupData()

Returns a pointer to wxPageSetupDialogData instance used by this class. You can set its parameters (via SetXXXX methods).