mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #571
This commit is contained in:
parent
0c949a265c
commit
57ef70e274
@ -145,6 +145,8 @@ def option_parser(usage, gui_mode=False):
|
||||
'''the line spacing by FONT_DELTA pts. FONT_DELTA can be a fraction.'''
|
||||
"""If FONT_DELTA is negative, the font size is decreased."""),
|
||||
dest='font_delta')
|
||||
laf.add_option('--ignore-colors', action='store_true', default=False, dest='ignore_colors',
|
||||
help=_('Render all content as black on white instead of the colors specified by the HTML or CSS.'))
|
||||
|
||||
|
||||
page = parser.add_option_group('PAGE OPTIONS')
|
||||
|
@ -822,7 +822,7 @@ class HTMLConverter(object):
|
||||
for prop in unneeded:
|
||||
fp.pop(prop)
|
||||
attrs = {}
|
||||
if 'color' in css:
|
||||
if 'color' in css and not self.ignore_colors:
|
||||
attrs['textcolor'] = lrs_color(css['color'])
|
||||
attrs.update(fp)
|
||||
elem = Span(text=src, **attrs) if (attrs or force_span_use) else src
|
||||
|
@ -507,7 +507,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="5" row="0" column="4" >
|
||||
<item rowspan="4" row="0" column="4" >
|
||||
<widget class="QGroupBox" name="groupBox_8" >
|
||||
<property name="title" >
|
||||
<string>Embedded Fonts</string>
|
||||
@ -575,6 +575,29 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_25" >
|
||||
<property name="text" >
|
||||
<string>Minimum &indent:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>gui_minimum_indent</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QDoubleSpinBox" name="gui_minimum_indent" >
|
||||
<property name="buttonSymbols" >
|
||||
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||
</property>
|
||||
<property name="suffix" >
|
||||
<string> pts</string>
|
||||
</property>
|
||||
<property name="decimals" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_9" >
|
||||
<property name="text" >
|
||||
@ -614,27 +637,38 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="4" >
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QCheckBox" name="gui_autorotation" >
|
||||
<property name="text" >
|
||||
<string>Enable auto &rotation of images</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="4" >
|
||||
<item>
|
||||
<widget class="QCheckBox" name="gui_blank_after_para" >
|
||||
<property name="text" >
|
||||
<string>Insert &blank lines between paragraphs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="4" >
|
||||
<item>
|
||||
<widget class="QCheckBox" name="gui_ignore_tables" >
|
||||
<property name="text" >
|
||||
<string>Ignore &tables</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2" >
|
||||
<item>
|
||||
<widget class="QCheckBox" name="gui_ignore_colors" >
|
||||
<property name="text" >
|
||||
<string>Ignore &colors</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_16" >
|
||||
<property name="text" >
|
||||
<string>&Preprocess:</string>
|
||||
@ -644,10 +678,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3" colspan="3" >
|
||||
<item row="4" column="3" colspan="2" >
|
||||
<widget class="QComboBox" name="preprocess" />
|
||||
</item>
|
||||
<item row="7" column="0" colspan="6" >
|
||||
<item row="5" column="0" colspan="5" >
|
||||
<widget class="QGroupBox" name="groupBox_5" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
|
||||
@ -682,39 +716,16 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2" >
|
||||
<item row="6" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_21" >
|
||||
<property name="text" >
|
||||
<string>Override<br>CSS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2" colspan="4" >
|
||||
<item row="6" column="2" colspan="3" >
|
||||
<widget class="QTextEdit" name="gui_override_css" />
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_25" >
|
||||
<property name="text" >
|
||||
<string>Minimum &indent:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>gui_minimum_indent</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QDoubleSpinBox" name="gui_minimum_indent" >
|
||||
<property name="buttonSymbols" >
|
||||
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||
</property>
|
||||
<property name="suffix" >
|
||||
<string> pts</string>
|
||||
</property>
|
||||
<property name="decimals" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pagesetup_page" >
|
||||
|
Loading…
x
Reference in New Issue
Block a user