Home > DeveloperSection > Forums > Printing WPF Document
Andrew Deniel
Andrew Deniel

Total Post:29

Posted on    August-16-2013 5:45 AM


 1 Reply(s)
 964  View(s)
Rate this:
Hi Developer!

How to specify the number of copies to be printed before you open the print dialog?

I need to print shipping labels and need to print copies equal to number of boxes.

Currently this is being achieved using the print dialog box but would be nice to achieve this in the code itself.

Any help would be appreciated.


shreesh chandra shukla
shreesh chandra shukla

Total Post:105

Posted on    August-17-2013 7:09 AM


It is very important that you read the FAQ and post your question.You need to write the code and then ask for any assistance.

The code here is in C# (Have not been tested)

  PrinterSettings settings = new PrinterSettings();//System.Drawing.Printing.PrinterSettings

  PrintDocument printDoc = new PrintDocument();

  settings.Copies = Copiesnumber; //put your number of copies

  printDoc.PrinterSettings = settings;

  PageSettings MyPage = new PageSettings(settings);

  printDoc.DefaultPageSettings = MyPage;


Don't want to miss updates? Please click the below button!

Follow MindStick