mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-23 18:53:36 +02:00
This commit is contained in:
parent
527a7da2ff
commit
8e2e7eccd9
@ -78,6 +78,8 @@ export default class InteropServiceHelper {
|
||||
shim.setTimeout(async () => {
|
||||
if (target === 'pdf') {
|
||||
try {
|
||||
// The below line "opens" all <details> tags before printing. This assures that the contents of the tag are visible in printed pdfs. Fixes https://github.com/laurent22/joplin/issues/6254.
|
||||
win.webContents.executeJavaScript('document.querySelectorAll(\'details\').forEach(el=>el.setAttribute(\'open\',\'\'))');
|
||||
const data = await win.webContents.printToPDF(options);
|
||||
resolve(data);
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user