private void HandleQueryPageSettings( object Sender, System.Drawing.Printing.QueryPageSettingsEventArgs args) { XPrintDocument doc = (XPrintDocument)Sender; DomDocument doc2 = (DomDocument)doc.CurrentPrintingPage.Document; //if (doc2.MainDocument != null) // doc2 = doc2.MainDocument; //doc2.RawPageIndex = doc2.Pages.IndexOf(doc.CurrentPrintPage); //doc2.ScriptRunner.ExecutePropertyScriptBlock(doc2, ReportConsts.ScriptOnQueryPageSettings); }
private void HandlePaintPage( object Sender, EventArgs args) { XPrintDocument doc = (XPrintDocument)Sender; DomDocument doc2 = (DomDocument)doc.CurrentPrintingPage.Document; doc2.PageIndex = doc.CurrentPrintingPage.GlobalIndex; doc2._Printing = true; if (this.WriterControl != null) { this.WriterControl.SetStatusText( string.Format(WriterStrings.PrintPage_PageIndex, doc2.PageIndex + 1)); } //doc2.Settings.LastPrintTime = DateTime.Now; //doc2.SetDocumentStateWithRaiseScript(DocumentState.Printing); }