|
自己解決しました。
簡易ソース乗せておきます。
private void pd_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Rectangle rect = new Rectangle(e.PageBounds.X, e.PageBounds.Y, e.PageBounds.Width, e.PageBounds.Height);
fpSpread1.OwnerPrintDraw(e.Graphics, rect, sheet, 1); }
private void button1_Click(object sender, EventArgs e) { PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(pd_PrintPage); printPreviewControl1.Document = pd; printPreviewControl1.InvalidatePreview(); }
|