dotnet / dotnet/wpf

WPF PrintDialog "Pages" option only allow input single page range, it should support multiple page ranges.

Open
#10,595 2 comments 1 reaction 0 assignees View on GitHub
Feature Request
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

WPF PrintDialog Pages option only allow input single page range, it should support multiple page ranges.
If users need to print page "2,5,6", as current WPF Print Dialog, users need to open the Print Dialog three times in order to print "2", "5" and "6".
To be efficient, the Print Dialog should support multiple page ranges.

### Reproduction Steps

WPF PrintDialog supports UserPageRangeEnabled property.
PrintDialog printDialog = new PrintDialog();
printDialog.UserPageRangeEnabled = true;

If set this property to "true", the WPF print dialog will enable "Pages" option. If users select "Pages" option, users can input single range such as "2-4" or "5" into the input box.
However, if users input "2-4, 6, 8-9" in the input box and click the Print button. The warning dialog displays and tell users that it only allows single page range.
In order to print "2-4, 6, 8-9", users need to open the WPF print dialog three times in order to print "2-4", "6" and "8-9" separately.

### Expected behavior

the WPF Print Dialog should support multiple page ranges such as "2-4, 6, 8-9" for "Pages" option.

### Actual behavior

WPF PrintDialog supports UserPageRangeEnabled property.
PrintDialog printDialog = new PrintDialog();
printDialog.UserPageRangeEnabled = true;

if users input "2-4, 6, 8-9" in the input box and click the Print button. WPF application should print 2, 3,4, 6, 8 and 9 pages automatically and without complaint.

### Regression?

_No response_

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.