/// <summary> /// 打印 /// </summary> /// <param name="printfile">照片路径</param> public void Print(string printfile) { PrintBitmap = ImageHepler.LoadBitmap(printfile); DocumentPrint.Print(); DocumentPrint.Dispose(); GC.Collect(); }
/// <summary> /// 打印预览 /// </summary> /// <param name="printfile">打印文件路径</param> public void PrintView(string printfile) { PrintBitmap = ImageHepler.LoadBitmap(printfile); var pv = new PrintPreviewDialog { Document = DocumentPrint }; pv.ShowDialog(); pv.Dispose(); GC.Collect(); }
/// <summary> /// /// </summary> /// <param name="path">图像路径</param> /// <param name="spacing">与上一行间距</param> public PaperImage(string path, decimal spacing) { PaperBitmap = ImageHepler.LoadBitmap(path); Spacing = spacing; }