<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">Microsoft Windows 10 Pro 10.0.19042 Build 19042</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">11.4.8</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">When a window.webContents.print function is called with the deviceName property: "MyPrinter", the print must be destined for the device "MyPrinter"</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/66485490/122248009-27a1c580-ce9e-11eb-8ace-ea8708fa669e.png"><img src="https://user-images.githubusercontent.com/66485490/122248009-27a1c580-ce9e-11eb-8ace-ea8708fa669e.png" alt="ex1" style="max-width: 100%;"></a></p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The problem occurs on Electron versions greater than 11.4.8 when a default printer is configured in the operating system.<br>
In the window.webContents.print function the deviceName property has no behavior, it's as if it doesn't exist</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/66485490/122249327-20c78280-ce9f-11eb-8043-2a78b8ee7cee.png"><img src="https://user-images.githubusercontent.com/66485490/122249327-20c78280-ce9f-11eb-8043-2a78b8ee7cee.png" alt="ex2" style="max-width: 100%;"></a></p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://gist.github.com/d2be71545b59c8449f8206180168d122">https://gist.github.com/d2be71545b59c8449f8206180168d122</a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Preflight Checklist</h3>
<p dir="auto">I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.<br>
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.<br>
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.</p>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">12.0.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 10 Home Single Language 20H2 19042.867</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">ia32</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto">11.4.2</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">This script should print to all existing printers. The printers "Microsoft XPS Document Writer" and "Microsoft Print to PDF" should block the loop and ask for file name.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">All prints will return success, but print will happen always only to print set as default in system.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://gist.github.com/fc8b4a9fbf986965c51e8f92b8ddb39f">https://gist.github.com/fc8b4a9fbf986965c51e8f92b8ddb39f</a></p>
<p dir="auto">Good way to run the test is to set printer "Microsoft Print To PDF" as default printer.</p>