private void AddPages(object sender, AddPagesEventArgs e) { printDoc.AddPage(this.RectangleToPrint); // Indicate that all of the print pages have been provided printDoc.AddPagesComplete(); }
private void PrintDic_AddPages(object sender, AddPagesEventArgs e) { Rectangle page = (Rectangle)this.FindName("MyWebViewRectangle"); printDoc.AddPage(page); printDoc.AddPagesComplete(); }
private void RegisterForPrinting() { PrintDocument pd = new PrintDocument(); pd.Paginate += (a, b) => { pd.SetPreviewPageCount(1, PreviewPageCountType.Final); }; pd.AddPages += (a, b) => { pd.AddPage(webReceipt); pd.AddPagesComplete(); }; pd.GetPreviewPage += (a, b) => { pd.SetPreviewPage(b.PageNumber, webReceipt); }; PrintManager.GetForCurrentView().PrintTaskRequested += (sender, e) => e.Request.CreatePrintTask("Účtenka RestSys", async args => { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { args.SetSource(pd.DocumentSource); }); }); }
void printDocument_AddPages(object p_sender, AddPagesEventArgs e) { if (m_printDocumentSource == null) { return; } else { if (m_pages == null || m_pages.Count == 0) { return; } } //LogHelper.LogActivityComplete("IMPRESSION : Envoi des pages à l'imprimante"); foreach (UIElement l_page in m_pages) { //LogHelper.LogActivityComplete("IMPRESSION : Ajout d'une page"); m_printDoc.AddPage(l_page); } PrintDocument printDoc = (PrintDocument)p_sender; printDoc.AddPagesComplete(); }
private void AddPages(object sender, AddPagesEventArgs e) { printDoc.AddPage(Orders_List); // Indicate that all of the print pages have been provided printDoc.AddPagesComplete(); }
/// <summary> /// This is the event handler for PrintDocument.AddPages. It provides all pages to be printed, in the form of /// UIElements, to an instance of PrintDocument. PrintDocument subsequently converts the UIElements /// into a pages that the Windows print system can deal with. /// </summary> /// <param name="sender">The print document.</param> /// <param name="e">Arguments containing the print task options.</param> protected override async void AddPrintPages(object sender, AddPagesEventArgs e) { PrintDocument printDoc = (PrintDocument)sender; // Loop over all of the preview pages for (int i = 0; i < NumberOfPhotos; i++) { UIElement page = null; bool pageReady = false; lock (printSync) { pageReady = pageCollection.TryGetValue(i, out page); } if (!pageReady) { // If the page is not ready create a task that will generate its content. page = await GeneratePageAsync(i + 1, currentPageDescription); } printDoc.AddPage(page); } // Indicate that all of the print pages have been provided. printDoc.AddPagesComplete(); // Reset the current page description as soon as possible since the PrintTask.Completed event might fire later (long running job) currentPageDescription = null; }
private void AddPrintPages(object sender, AddPagesEventArgs e) { PrintDocument printDoc = (PrintDocument)sender; printDoc.AddPage(this.printPage); printDoc.AddPagesComplete(); }
//添加打印页面的内容 private void PrintDic_AddPages(object sender, AddPagesEventArgs e) { //增加一个页要打印的元素 printDoc.AddPage(this); //完成对打印页面的增加 printDoc.AddPagesComplete(); }
async void OnAddPages(object sender, AddPagesEventArgs e) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() => { var image = await RenderPageForPrinting(AssociatedObject); printDocument.AddPage(image); printDocument.AddPagesComplete(); }); }
private void PrintDoc_AddPages(object sender, AddPagesEventArgs e) { foreach (var item in paginas) { printDoc.AddPage(item); } printDoc.AddPagesComplete(); }
protected void AddPrintPages(object sender, AddPagesEventArgs e) { foreach (UIElement element in printPreviewElements) { printDocument.AddPage(element); } ((PrintDocument)sender).AddPagesComplete(); }
private void PrintDic_AddPages(object sender, AddPagesEventArgs e) { foreach (var item in MyPrintPages.Items) { var rect = item as Rectangle; printDoc.AddPage(rect); } printDoc.AddPagesComplete(); }
void OnPrintDocumentAddPages(object sender, AddPagesEventArgs args) { foreach (UIElement calendarPage in calendarPages) { printDocument.AddPage(calendarPage); } printDocument.AddPagesComplete(); }
/// <summary> /// “导出”功能添加页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void PrintDocument_AddPages(object sender, AddPagesEventArgs e) { foreach (var page in pagesToPrint) { printDocument.AddPage(page); } printDocument.AddPagesComplete(); }
private void PrintDocument_AddPages(object sender, AddPagesEventArgs e) { foreach (UIElement page in _printPages) { _printDocument.AddPage(page); } // Indicate that all of the print pages have been provided _printDocument.AddPagesComplete(); }
void OnPrintDocumentAddPages(object sender, AddPagesEventArgs args) { if (customPageRange != null && customPageRange.IsValid) { foreach (int oneBasedIndex in customPageRange.PageMapping) { printDocument.AddPage(bookPages[oneBasedIndex - 1]); } } else { foreach (UIElement bookPage in bookPages) { printDocument.AddPage(bookPage); } } printDocument.AddPagesComplete(); }
/// <summary> /// 印刷情報の設定 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddPages(object sender, AddPagesEventArgs e) { foreach (UImage image in _imageList.Items) { _printDocument.AddPage(image); } // 印刷開始 _printDocument.AddPagesComplete(); }
private void AddPages(object sender, AddPagesEventArgs e) { foreach (var element in ElementsToPrint) { printDoc.AddPage(element); } // Indicate that all of the print pages have been provided printDoc.AddPagesComplete(); }
protected virtual void AddPrintPages(object sender, AddPagesEventArgs e) { for (int i = 0; i < printPreviewPages.Count; i++) { printDocument.AddPage(printPreviewPages[i]); } PrintDocument printDoc = (PrintDocument)sender; printDoc.AddPagesComplete(); }
void printDocument_AddPages(object sender, AddPagesEventArgs e) { for (int i = 0; i < pages.Count; i++) { document.AddPage(pages[i]); } PrintDocument printDoc = (PrintDocument)sender; printDoc.AddPagesComplete(); }
protected virtual void AddPrintPages(object sender, AddPagesEventArgs e) { // Loop over all of the preview pages and add each one to add each page to be printied for (int i = 0; i < printPreviewPages.Count; i++) { printDocument.AddPage(printPreviewPages[i]); } // Indicate that all of the print pages have been provided printDocument.AddPagesComplete(); }
private void AddPrintPages(object sender, AddPagesEventArgs e) { // add all already prepared pages to print document for (int i = 0; i < printPages.Count; i++) { printDocument.AddPage(printPages[i]); } // Indicate that all of the print pages have been provided (sender as PrintDocument).AddPagesComplete(); }
private void AddPages(object sender, AddPagesEventArgs e) { try { printDoc.AddPage(this); } catch { App.ShowMessage("Please restart application and try again."); } // Indicate that all of the print pages have been provided printDoc.AddPagesComplete(); }
private void AddPages(object sender, AddPagesEventArgs e) { for (var i = 1; i < _pageCount + 1; i++) { var el = OnPrinting(i); printDoc.AddPage(el); OnPrinted(i, el); } printDoc.AddPagesComplete(); }
private static void AddPrintPages(object sender, AddPagesEventArgs e) { // Loop over all of the preview pages and add each one to add each page to be printied for (int i = 0; i < printPreviewPages.Count; i++) { // We should have all pages ready at this point... printDocument.AddPage(printPreviewPages[i].Page); } // Indicate that all of the print pages have been provided printDocument.AddPagesComplete(); }
/// <summary> /// This is the event handler for PrintDocument.AddPages. It provides all pages to be printed, in the form of /// UIElements, to an instance of PrintDocument. PrintDocument subsequently converts the UIElements /// into a pages that the Windows print system can deal with. /// </summary> /// <param name="sender">PrintDocument</param> /// <param name="e">Add page event arguments containing a print task options reference.</param> protected virtual void OnAddPrintPages(object sender, AddPagesEventArgs e) { // Loop over all of the preview pages and add each one to add each page to be printed. for (int i = 0; i < PrintPreviewPages.Count; i++) { // We should have all pages ready at this point. PrintDocument.AddPage(PrintPreviewPages[i]); } // Indicate that all of the print pages have been provided. (sender as PrintDocument).AddPagesComplete(); }
private void AddPages(object sender, AddPagesEventArgs e) { string textStr = ""; flextextwrite.Document.GetText(TextGetOptions.FormatRtf, out textStr); RichEditBox richTextBlock = new RichEditBox(); richTextBlock.Document.SetText(TextSetOptions.FormatRtf, textStr); richTextBlock.Background = new SolidColorBrush(Windows.UI.Colors.White); richTextBlock.Padding = new Thickness(20, 20, 20, 20); printDoc.AddPage(richTextBlock); }
private async void AddPages(object sender, AddPagesEventArgs e) { for (int i = min; i <= max; i++) { await CreateQR(i); printDoc.AddPage(this.RectangleToPrint); } // Indicate that all of the print pages have been provided printDoc.AddPagesComplete(); }
/// <summary> /// This is the event handler for PrintDocument.AddPages. It provides all pages to be printed, in the form of /// UIElements, to an instance of PrintDocument. PrintDocument subsequently converts the UIElements /// into a pages that the Windows print system can deal with. /// </summary> /// <param name="sender">PrintDocument</param> /// <param name="e">Add page event arguments containing a print task options reference</param> private void AddPrintPages(object sender, AddPagesEventArgs e) { // Loop over all of the pages and add each one to be printed foreach (FrameworkElement page in pages) { printDocument.AddPage(page); } PrintDocument printDoc = (PrintDocument)sender; // Indicate that all of the print pages have been provided printDoc.AddPagesComplete(); }
/// <summary> /// This is the event handler for PrintDocument.AddPages. It provides all pages to be printed, in the form of /// UIElements, to an instance of PrintDocument. PrintDocument subsequently converts the UIElements /// into a pages that the Windows print system can deal with. /// </summary> /// <param name="sender">PrintDocument</param> /// <param name="e">Add page event arguments containing a print task options reference</param> protected virtual void AddPrintPages(object sender, AddPagesEventArgs e) // Required { // Loop over all of the preview pages and add each one to add each page to be printed for (int i = 0; i < _printPreviewPages.Count; i++) { // We should have all pages ready at this point... _printDocument.AddPage(_printPreviewPages[i]); } PrintDocument printDoc = (PrintDocument)sender; // Indicate that all of the print pages have been provided printDoc.AddPagesComplete(); }