// The first thing to do before we try to print is build up the header and footer elements. We'll create default ones in the constructor: public PrintEngine() { // create the header... Header = new PrintElement(null); Header.AddText("Report"); Header.AddText("Page: [pagenum]"); Header.AddHorizontalRule(); Header.AddBlankLine(); // create the footer... Footer = new PrintElement(null); Footer.AddBlankLine(); Footer.AddHorizontalRule(); Footer.AddText("Confidential"); }
public void Print(PrintElement element) { element.AddText(text); }