示例#1
0
        // 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);
        }
示例#2
0
 // Create a graphics object that can be used to perform text measurement.
 public Graphics CreateMeasurementGraphics()
 {
     return(ToolkitManager.CreateGraphics
                (ToolkitPrinter.CreateMeasurementGraphics()));
 }