public override void OnStartPrint(PrintDocument document, PrintEventArgs e) { IntPtr dc = PrintingServices.CreateGraphicsContext(document.PrinterSettings, document.DefaultPageSettings); e.GraphicsContext = new GraphicsPrinter(null, dc); PrintingServices.StartDoc(e.GraphicsContext, document.DocumentName, string.Empty); }
internal PrinterSettings (PrintingServices printing_services) { this.printing_services = printing_services; printer_name = printing_services.DefaultPrinter; ResetToDefaults (); printing_services.LoadPrinterSettings (printer_name, this); }
internal PrinterSettings(PrintingServices printing_services) { this.printing_services = printing_services; printer_name = printing_services.DefaultPrinter; ResetToDefaults(); printing_services.LoadPrinterSettings(printer_name, this); }
internal static void GetPrintDialogInfo(string printer, ref string port, ref string type, ref string status, ref string comment) { PrintingServices.GetPrintDialogInfo(printer, ref port, ref type, ref status, ref comment); }
internal NameValueCollection printer_capabilities; // this stores a list of all the printer options. Used only in cups, but might come in handy on win too. public PrinterSettings() { printer_name = PrintingServices.DefaultPrinter; ResetToDefaults(); PrintingServices.LoadPrinterSettings(printer_name, this); }
public override Graphics OnStartPage(PrintDocument document, PrintPageEventArgs e) { PrintingServices.StartPage(e.GraphicsContext); return(e.Graphics); }
public override void OnEndPrint(PrintDocument document, PrintEventArgs e) { PrintingServices.EndDoc(e.GraphicsContext); }