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
|
id: low_slider
|
||||||
minimumValue: 1
|
minimumValue: 1
|
||||||
maximumValue: high
|
maximumValue: high > 100 ? 100 : high
|
||||||
width: parent.width
|
width: parent.width
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
value: choice_low
|
value: choice_low
|
||||||
|
@ -79,7 +79,7 @@ Setting {
|
||||||
{
|
{
|
||||||
id: high_slider
|
id: high_slider
|
||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: high
|
maximumValue: high > 100 ? 100 : high
|
||||||
width: parent.width
|
width: parent.width
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
value: choice_high
|
value: choice_high
|
||||||
|
|
|
@ -114,12 +114,13 @@ Page {
|
||||||
case IppMsg.IntegerRange:
|
case IppMsg.IntegerRange:
|
||||||
var valid = printer.attrs.hasOwnProperty(name+"-supported") &&
|
var valid = printer.attrs.hasOwnProperty(name+"-supported") &&
|
||||||
name=="page-ranges" && Mimer.get_type(selectedFile) == "application/pdf";
|
name=="page-ranges" && Mimer.get_type(selectedFile) == "application/pdf";
|
||||||
|
var pdfpages = ConvertChecker.pdfPages(selectedFile);
|
||||||
loader.setSource("../components/RangeSetting.qml",
|
loader.setSource("../components/RangeSetting.qml",
|
||||||
{name: name,
|
{name: name,
|
||||||
prettyName: prettyName,
|
prettyName: prettyName,
|
||||||
tag: tag,
|
tag: tag,
|
||||||
valid: valid,
|
valid: valid,
|
||||||
high: name=="page-ranges" ? ConvertChecker.pdfPages(selectedFile) : 0
|
high: name=="page-ranges" ? (pdfpages == 0 ? 65535 : pdfpages) : 0
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case IppMsg.Resolution:
|
case IppMsg.Resolution:
|
||||||
|
|
Loading…
Reference in a new issue