Previewing output

If you want to preview the output before printing, you can use PreviewFile(html-file). In this case the input is the name of a file local to your machine containing the HTML. Alternately, you can use the method PreviewText(htmlText, base-path^'") . The htmltext is the actual HTML you want printed. The basepath is a path or URL to the location of the file which is used to resolve things like relative image paths. Both methods return Boolean True if the preview is successful, and Boolean False if not. If there is an error, the global method wx.Printer.GetLast-Error() will have more information about the error. More detailed information about that method is discussed in chapter 17.

Was this article helpful?

0 0

Post a comment