mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX: Turn off default pagebreaks before headings
This commit is contained in:
parent
77913d28f3
commit
82b06b765a
@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
from calibre.customize.conversion import InputFormatPlugin
|
from calibre.customize.conversion import InputFormatPlugin, OptionRecommendation
|
||||||
|
|
||||||
class DOCXInput(InputFormatPlugin):
|
class DOCXInput(InputFormatPlugin):
|
||||||
name = 'DOCX Input'
|
name = 'DOCX Input'
|
||||||
@ -14,6 +14,8 @@ class DOCXInput(InputFormatPlugin):
|
|||||||
description = 'Convert DOCX files (.docx) to HTML'
|
description = 'Convert DOCX files (.docx) to HTML'
|
||||||
file_types = set(['docx'])
|
file_types = set(['docx'])
|
||||||
|
|
||||||
|
recommendations = set([('page_breaks_before', '/', OptionRecommendation.MED)])
|
||||||
|
|
||||||
def convert(self, stream, options, file_ext, log, accelerators):
|
def convert(self, stream, options, file_ext, log, accelerators):
|
||||||
from calibre.ebooks.docx.to_html import Convert
|
from calibre.ebooks.docx.to_html import Convert
|
||||||
return Convert(stream, log=log)()
|
return Convert(stream, log=log)()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user