mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: When printing, resepect the specified page range. Fixes #1074220 (Trying to select the page to print will actually print the whole book)
This commit is contained in:
parent
f68b22881a
commit
3491ab4ab1
@ -54,6 +54,8 @@ class Printing(QObject):
|
|||||||
pr.height()/zoomy))
|
pr.height()/zoomy))
|
||||||
evaljs = self.mf.evaluateJavaScript
|
evaljs = self.mf.evaluateJavaScript
|
||||||
loop = QEventLoop(self)
|
loop = QEventLoop(self)
|
||||||
|
pagenum = 0
|
||||||
|
from_, to = printer.fromPage(), printer.toPage()
|
||||||
first = True
|
first = True
|
||||||
|
|
||||||
for path in self.iterator.spine:
|
for path in self.iterator.spine:
|
||||||
@ -74,6 +76,8 @@ class Printing(QObject):
|
|||||||
''')
|
''')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
pagenum += 1
|
||||||
|
if (pagenum >= from_ and (to == 0 or pagenum <= to)):
|
||||||
if not first:
|
if not first:
|
||||||
printer.newPage()
|
printer.newPage()
|
||||||
first = False
|
first = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user