printer dialog box

RonR

Well-known member
Joined
Nov 23, 2007
Messages
82
Programming Experience
5-10
how do I turn on and use the feature that allows the user to select which pages to print?

example: from page 3 to page 4
 
This is a printer setting. You can use the PrintDialog and set the AllowSomePages property to let user select a range with this dialog, when the PrintDocument is assigned the PrinterSettings are automatically transferred. Or you can give user a your own custom page range dialog and set the PrintDocument.PrinterSettings properties directly, these are PrintRange, FromPage and ToPage. In the PrintPage event you draw the relevant ranges dynamically according to these properties found in e.PageSettings.PrinterSettings.
 
do I need to use the users page selections to code my print code to only
print the requested pages, or can I somehow tell the print preview the pages that the user has selected?

it looks to me like it should be built in except that I have to tell the print preview to only print the requested pages.
 
"PrintPreview" will only display what you draw from the PrintPage event of the PrintDocument, this is where you control what in the end outputs to preview/print.
 
Back
Top