<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.6</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Ubuntu</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">Ubuntu 20.04.2 LTS</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">I expect the print dialog <strong><em>not</em></strong> to appear when pressing print.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The print dialog shows.</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">This is the code I have seen used, but it does not work. I cannot find any further docs on this and I have seen people in the past report it as a bug, but I can't find what the actual issue is and any work arounds.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
  });

  mainWindow.webContents.print(
    {
      silent: true,
      printBackground: false,
      deviceName: &quot;HP_DeskJet_4100_series_A6BABF_test&quot;,
    }"><pre class="notranslate"><code class="notranslate">const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
  });

  mainWindow.webContents.print(
    {
      silent: true,
      printBackground: false,
      deviceName: "HP_DeskJet_4100_series_A6BABF_test",
    }
</code></pre></div>