Setting fonts

You can set the fonts for the printing using the method SetFonts(normal_face, fixed_face, sizes). This method behaves in the same way SetFonts() does for the HTML window (the settings in the print object do not affect the settings in the HTML window). You can set a page header or page footer to be printed on each page using the methods SetHeader(header, pg) and SetFooter(footer, pg). The header and footer arguments are the strings to be displayed. In the string, you can use the placeholder @[email protected] which is replaced at runtime with the page number being printed. You can also use the placeholder @[email protected] which is the total number of pages being printed. You can use either placeholder as many times as you want. The pg parameter is one of the three constants wx.PAGE_ALL, wx.PAGE_EVEN, or wx.PAGE_ODD. The constant controls on which pages the header or footer displays. By calling this method more than once with different pg settings, you can set separate headers and footers for odd and even pages.

Was this article helpful?

0 0

Post a comment