<h3 dir="auto">Preflight Checklist</h3>

<ul dir="auto">
<li>[ x ] I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li>[ x ] 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>[ x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>10.1.1</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.15.6</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>unknown</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">I should be able to save a pdf file from the pdf menu without the app crashing</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">the pdf saves, but the app crashes</p>
<h3 dir="auto">To Reproduce</h3>




<p dir="auto">Electron fiddle:<br>
<a href="https://gist.github.com/c5de74c2973633e178803eef65b827df">https://gist.github.com/c5de74c2973633e178803eef65b827df</a></p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1267580/92657588-62feda80-f2f5-11ea-8639-6c63c576703f.png"><img src="https://user-images.githubusercontent.com/1267580/92657588-62feda80-f2f5-11ea-8639-6c63c576703f.png" alt="pdf-menu" style="max-width: 100%;"></a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">It seems to be any of the options in this menu that crashes the app.<br>
Removing the callback and running it like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mainWindow.webContents.print(printOptions)"><pre class="notranslate"><code class="notranslate">mainWindow.webContents.print(printOptions)
</code></pre></div>
<p dir="auto">seems to resolve it -- but I need the callback</p>
<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 issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>10.1.0</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 7</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>Didn't tried with any previous versions</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Main process shouldn't crash when printing any content in the render process.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Main process crashes when trying to print <code class="notranslate">div</code> content</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">Angular application running over Electron, and triggering <code class="notranslate">window.print()</code> from new window (using <code class="notranslate">window.open()</code>)</p>