<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">13.1.2</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Windows</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">Windows 7 SP1 incl. latest patches</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Calling <a href="https://www.electronjs.org/docs/api/web-contents#contentsprintoptions-callback" rel="nofollow">webContents.print()</a> with the absolute minimal set of options and an existing device as returned from <a href="https://www.electronjs.org/docs/api/web-contents#contentsgetprinters" rel="nofollow">contents.getPrinters()</a> should add the document to be printed to the printer's print queue and subsequently trigger the printing of said document.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const options = {
  silent: true,
  deviceName: 'My-Printer',
}
await win.webContents.print(options);
"><pre class="notranslate"><code class="notranslate">const options = {
  silent: true,
  deviceName: 'My-Printer',
}
await win.webContents.print(options);

</code></pre></div>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The call to <a href="https://www.electronjs.org/docs/api/web-contents#contentsprintoptions-callback" rel="nofollow">win.webContents.print</a> just silently returns, indicating success, yet no document is ever added to the printer's print queue and no document is ever printed.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">The printer in question is working fine with every other application, so it is definitely not a printer or driver or operating system issue.</p>
<p dir="auto">Can the documentation clearly state how to comprehensively prevent the user from accessing the dev tools.</p>
<p dir="auto">remove from top menu<br>
remove toggle code when app starts up so it's initially hidden<br>
What else must I do? Perhaps this should be in the documentation.<br>
I read in a few places about handling the --remote-debugging-port command line argument. I read that if it exists, the app should just immediately exit.</p>
<p dir="auto">There might be some other ways that the user can access it. What are they? It would be great if the documentation stated it for security reasons.</p>