---
title: "Printing WPF Document"  
description: "Printing WPF Document"  
author: "Andrew Deniel"  
published: 2013-08-16  
updated: 2013-08-17  
canonical: https://www.mindstick.com/forum/1375/printing-wpf-document  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# Printing WPF Document

Hi [Developer](https://www.mindstick.com/articles/157260/variation-between-web-designer-and-web-developer)!

How to specify the number of copies to be printed before you open the [print](https://www.mindstick.com/blog/301752/types-of-3d-printing-technology) dialog?

I need to print [shipping](https://www.mindstick.com/articles/311006/online-retailers-are-starting-to-handle-their-own-shipping) [labels](https://www.mindstick.com/forum/34568/badges-labels-page-headers) and need to print copies equal to number of boxes.

Currently this is being achieved using the print [dialog box](https://www.mindstick.com/forum/34699/create-alert-dialog-box-in-android) but would be nice to achieve this in the [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) itself.

Any help would be appreciated.

Thanks!

## Replies

### Reply by shreesh chandra shukla

Hi!

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;
```

\

thanks


---

Original Source: https://www.mindstick.com/forum/1375/printing-wpf-document

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
