// Load the default page settings for the printer. private void LoadDefaults() { // Initialize the defaults object. PageSettings defaults = new PageSettings(); defaults.Color = false; defaults.Landscape = false; defaults.PaperSize = new PaperSize(PaperKind.Letter); defaults.PaperSource = new PaperSource(PaperSourceKind.AutomaticFeed, null); defaults.PrinterResolution = new PrinterResolution (PrinterResolutionKind.Medium, 300, 300); defaultPageSettings = defaults; // Load printer-specific overrides from the system. ToolkitPrinter.LoadDefaults(defaults); }
// Create a graphics object that can be used to perform text measurement. public Graphics CreateMeasurementGraphics() { return(ToolkitManager.CreateGraphics (ToolkitPrinter.CreateMeasurementGraphics())); }