problem with OpenPrinterDialog

I have a problem with OpenPrinterDialog.
I already have made ??a function to send my reports to print, but it turns out I find the following:

I have a preview of what will print, consisting in 5 pages, but if I select in the dialog box of the printer settings and print pages, select only print page 3, here comes the problem… I not only print page 3, but I print the entire document, 5 pages.

So I want to know how to set when you select to print a single page, I just print that page you select and not the whole document.

Thank you for your help.

The graphics object which you pass to the printer will have a .firstpage and .lastpage properties. You will need to access those properties to determine that the user selected page 3 to 3. You can then determine where that falls on your printer output and print only the selected pages.