How can I set or specify the number of pages to be print?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • damtoii
    New Member
    • Jan 2014
    • 9

    How can I set or specify the number of pages to be print?

    I created a richtextbox to input the text that I want to print, the command for printing which is the button and instead of printdialog box((PrintDialo g1.ShowDialog() == System.Windows. Forms.DialogRes ult.OK)) to be display, I created combobox which will display the available printers and then print. Like this code bellow .

    To get the available printers:

    foreach (String printer in PrinterSettings .InstalledPrint ers)
    {
    cbox.Items.Add( printer.ToStrin g());
    }

    And the button for printing :

    PrintDocument1. PrinterSettings .PrinterName = cbox.SelectedIt em.ToString();

    PrintDocument1. Print();

    Now what I want to do is I will add some textbox to input the page number to be printed . For example the current pages in the richtextbox are 12pages when I'm going to run the program I will input in the textbox the page/s that I want like (3-7pages). How could it be ?
  • Luk3r
    Contributor
    • Jan 2014
    • 300

    #2
    Here's a pretty straight forward write up. Remember that you have to draw before you can print:

    Comment

    Working...