Enable page ranges for when pdfinfo is missing
This commit is contained in:
parent
e1d34a4d1d
commit
d44dcf0a88
2 changed files with 4 additions and 3 deletions
|
@ -50,7 +50,7 @@ Setting {
|
|||
{
|
||||
id: low_slider
|
||||
minimumValue: 1
|
||||
maximumValue: high
|
||||
maximumValue: high > 100 ? 100 : high
|
||||
width: parent.width
|
||||
stepSize: 1
|
||||
value: choice_low
|
||||
|
@ -79,7 +79,7 @@ Setting {
|
|||
{
|
||||
id: high_slider
|
||||
minimumValue: 0
|
||||
maximumValue: high
|
||||
maximumValue: high > 100 ? 100 : high
|
||||
width: parent.width
|
||||
stepSize: 1
|
||||
value: choice_high
|
||||
|
|
|
@ -114,12 +114,13 @@ Page {
|
|||
case IppMsg.IntegerRange:
|
||||
var valid = printer.attrs.hasOwnProperty(name+"-supported") &&
|
||||
name=="page-ranges" && Mimer.get_type(selectedFile) == "application/pdf";
|
||||
var pdfpages = ConvertChecker.pdfPages(selectedFile);
|
||||
loader.setSource("../components/RangeSetting.qml",
|
||||
{name: name,
|
||||
prettyName: prettyName,
|
||||
tag: tag,
|
||||
valid: valid,
|
||||
high: name=="page-ranges" ? ConvertChecker.pdfPages(selectedFile) : 0
|
||||
high: name=="page-ranges" ? (pdfpages == 0 ? 65535 : pdfpages) : 0
|
||||
})
|
||||
break
|
||||
case IppMsg.Resolution:
|
||||
|
|
Loading…
Reference in a new issue