joe_pool_is Posted March 20, 2009 Posted March 20, 2009 I need a way to add the total number of pages in a document to the PrintDialog: PrintDocument printDoc = new PrintDocument(); void GenericFn() { PrintDialog pd = new PrintDialog(); pd.Document = printDoc; pd.PrinterSettings.FromPage = 1; pd.PrinterSettings.ToPage = 1; // how do I set this value from printDoc? pd.ShowDialog(); } I'm using this DataGridViewer Printer class that nicely handles sending all of the code from the DataGridViewer to the printer using PrintDocument.PrintPage and PrintDocument.BeginPrint routines, but the code doesn't have a way to determine how many pages are in the entire document. Is anyone here skilled in this? I'd like my operators to be able to select only 1-5 pages to print, or cancel when they see it contains 115 pages, etc. Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.