mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Fix CSS opacity property causing text to not be rendered. Now opacity is ignored, as it is unsupported by Qt WebKit. Fixes #1792048 [Text with opacity disappear after converting to PDF](https://bugs.launchpad.net/calibre/+bug/1792048)
This commit is contained in:
parent
4f025790e5
commit
84cc6cab53
@ -419,6 +419,10 @@ class PDFWriter(QObject):
|
|||||||
|
|
||||||
amap = json.loads(evaljs('''
|
amap = json.loads(evaljs('''
|
||||||
document.body.style.backgroundColor = "white";
|
document.body.style.backgroundColor = "white";
|
||||||
|
// Qt WebKit cannot handle opacity with the Pdf backend
|
||||||
|
s = document.createElement('style');
|
||||||
|
s.textContent = '* {opacity: 1 !important}';
|
||||||
|
document.documentElement.appendChild(s);
|
||||||
paged_display.set_geometry(1, %d, %d, %d);
|
paged_display.set_geometry(1, %d, %d, %d);
|
||||||
paged_display.layout();
|
paged_display.layout();
|
||||||
paged_display.fit_images();
|
paged_display.fit_images();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user