谢谢您的反馈。
不好意思回复晚了。
您图里提供的内容是默认的。
如果仅仅是不想要展示对话框,那么直接通过C1PrintPreview.FileSave(string filename)方法打印。
如果想要展示对话框,但是又想自定义,那么没有直接的接口来设置。
你就需要自己去定义这段代码逻辑,代码参考:
- private void button2_Click(object sender, System.EventArgs e)
- {
- SaveFileDialog sfd = new SaveFileDialog();
- // set up your dialog options here
- if (sfd.ShowDialog(this) == DialogResult.OK)
- {
- // will save as .c1d
- this.c1PrintDocument1.Save(sfd.FileName);
- // ... or, use this to save as HTML
- C1.C1PrintDocument.Export.HtmlExporter exh = new C1.C1PrintDocument.Export.HtmlExporter();
- exh.Document = this.c1PrintPreview1.Document;
- exh.OutputFileName = sfd.FileName;
- // fine-tune other exh options here...
- exh.Export();
- // ... or this to save as PDF
- C1.C1PrintDocument.Export.PdfExporter exp = new C1.C1PrintDocument.Export.PdfExporter();
- exp.Document = this.c1PrintPreview1.Document;
- exp.OutputFileName = sfd.FileName;
- // fine-tune other exp options here...
- exp.Export();
- }
- }
复制代码
|