question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

As far as I can tell the CSS option is ignored. When set it gets added to the opts Object https://github.com/fraserxu/electron-pdf/blob/master/index.js#L70 which then later on is passed to win.printToPDF https://github.com/fraserxu/electron-pdf/blob/master/index.js#L108. webContents.printToPDF does not support the css option though. What it does support is webContents.insertCSS(css) https://github.com/atom/electron/blob/master/docs/api/web-contents.md#webcontentsinsertcsscss which should be used instead

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
RamIdeascommented, Nov 25, 2016

I got around this by dispatching a ‘view-ready’ event after the document.fonts.ready promise resolves

<script>
    document.fonts.ready.then( () => document.body.dispatchEvent(new Event('view-ready')) );
</script>
0reactions
codecounselorcommented, Feb 15, 2017

Closing, for any circumstances such as this, the waitForJSEvent should be leveraged as demonstrated by @RamIdeas

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to style the option of an html "select" element?
You can style the option elements to some extent. Using the * CSS selector you can style the options inside the box that...
Read more >
HTML option tag - W3Schools
The <option> tag defines an option in a select list. <option> elements go inside a <select>, <optgroup>, or <datalist> element. Note: The < ......
Read more >
The HTML Option element - MDN Web Docs - Mozilla
The <option> HTML element is used to define an item contained in a <select> , an <optgroup> , or a <datalist> element. As...
Read more >
Custom Select Styles with Pure CSS | Modern CSS Solutions
Modern CSS gives us a range of properties to achieve custom select styles that have a near-identical initial appearance.
Read more >
HTML option style Attribute - Dofactory
A style attribute on an <option> tag assigns a unique style to the option. Its value is CSS that defines the appearance of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found