mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
EPUB Output: Make splitting to size more accurate by moving it after the workarounds
This commit is contained in:
parent
e4aac569de
commit
96e76fb230
@ -155,17 +155,19 @@ class EPUBOutput(OutputFormatPlugin):
|
|||||||
def convert(self, oeb, output_path, input_plugin, opts, log):
|
def convert(self, oeb, output_path, input_plugin, opts, log):
|
||||||
self.log, self.opts, self.oeb = log, opts, oeb
|
self.log, self.opts, self.oeb = log, opts, oeb
|
||||||
|
|
||||||
|
self.workaround_ade_quirks()
|
||||||
|
self.workaround_webkit_quirks()
|
||||||
|
self.workaround_sony_quirks()
|
||||||
|
from calibre.ebooks.oeb.transforms.rescale import RescaleImages
|
||||||
|
RescaleImages()(oeb, opts)
|
||||||
|
|
||||||
|
|
||||||
from calibre.ebooks.oeb.transforms.split import Split
|
from calibre.ebooks.oeb.transforms.split import Split
|
||||||
split = Split(not self.opts.dont_split_on_page_breaks,
|
split = Split(not self.opts.dont_split_on_page_breaks,
|
||||||
max_flow_size=self.opts.flow_size*1024
|
max_flow_size=self.opts.flow_size*1024
|
||||||
)
|
)
|
||||||
split(self.oeb, self.opts)
|
split(self.oeb, self.opts)
|
||||||
|
|
||||||
self.workaround_ade_quirks()
|
|
||||||
self.workaround_webkit_quirks()
|
|
||||||
self.workaround_sony_quirks()
|
|
||||||
from calibre.ebooks.oeb.transforms.rescale import RescaleImages
|
|
||||||
RescaleImages()(oeb, opts)
|
|
||||||
self.insert_cover()
|
self.insert_cover()
|
||||||
|
|
||||||
with TemporaryDirectory('_epub_output') as tdir:
|
with TemporaryDirectory('_epub_output') as tdir:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user