<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">11.2.0 12.0.0</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">macOS</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">macos 11.2.3</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">clone the <code class="notranslate">electron-quick-start</code> example.</p>
<p dir="auto">Fill index.html with following content:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --&gt;
    &lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;default-src 'self'; script-src 'self'&quot;&gt;
    &lt;meta http-equiv=&quot;X-Content-Security-Policy&quot; content=&quot;default-src 'self'; script-src 'self'&quot;&gt;
    &lt;title&gt;Hello World!&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello World!&lt;/h1&gt;
    We are using Node.js &lt;span id=&quot;node-version&quot;&gt;&lt;/span&gt;,
    Chromium &lt;span id=&quot;chrome-version&quot;&gt;&lt;/span&gt;,
    and Electron &lt;span id=&quot;electron-version&quot;&gt;&lt;/span&gt;.

    &lt;form id=&quot;searchForm&quot; action=&quot;http://www.africau.edu/images/default/sample.pdf&quot; method=&quot;get&quot;&gt;
      &lt;div class=&quot;btn-group form-inline&quot;&gt;
          &lt;button name='submit'&gt;open pdf window&lt;/button&gt;
      &lt;/div&gt;
    &lt;/form&gt;

    &lt;!-- You can also require other files to run in this process --&gt;
    &lt;script src=&quot;./renderer.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;

"><pre class="notranslate"><code class="notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --&gt;
    &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'"&gt;
    &lt;meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'"&gt;
    &lt;title&gt;Hello World!&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello World!&lt;/h1&gt;
    We are using Node.js &lt;span id="node-version"&gt;&lt;/span&gt;,
    Chromium &lt;span id="chrome-version"&gt;&lt;/span&gt;,
    and Electron &lt;span id="electron-version"&gt;&lt;/span&gt;.

    &lt;form id="searchForm" action="http://www.africau.edu/images/default/sample.pdf" method="get"&gt;
      &lt;div class="btn-group form-inline"&gt;
          &lt;button name='submit'&gt;open pdf window&lt;/button&gt;
      &lt;/div&gt;
    &lt;/form&gt;

    &lt;!-- You can also require other files to run in this process --&gt;
    &lt;script src="./renderer.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;


</code></pre></div>
<p dir="auto">open pdf window</p>
<p dir="auto">Then just execute <code class="notranslate">window.print()</code> within pdf_window. Print dialog model opened, click ok, content should be printed &amp;&amp; the pdf_window can scroll normally.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The <code class="notranslate">pdf_window</code>  will been stalled with no response to any interaction.</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"><em>No response</em></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>11.2.2</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 10</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">printToPDF should finish</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Calling printToPDF in a window that contains a cross origin iframe will never resolve.<br>
<strong>Additionally all other calls to printToPDF never resolve as well, even for other windows and other partitions</strong></p>
<h3 dir="auto">To Reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const electron = require(&quot;electron&quot;);
function init() {
	let browserWindow3 = new electron.BrowserWindow({
		show: true,
		x: 500,
		y: 100,
		width: 900,
		height: 900,
		webPreferences: {
			partition: &quot;persist:test1&quot;
		}
	});
	let browserWindow2 = new electron.BrowserWindow({
		show: true,
		x: 500,
		y: 100,
		width: 900,
		height: 900,
		webPreferences: {
			partition: &quot;persist:test2&quot;
		}
	});
	browserWindow2.webContents.loadURL(&quot;http://www.google.com&quot;)
	browserWindow3.webContents.loadURL(&quot;http://localhost:9000/index.html&quot;).then(() =&gt; {
		setTimeout(() =&gt; {
			console.log(&quot;calling print to pdf&quot;);

			// Comment out this one to make the other one work
			browserWindow3.webContents.printToPDF({
			}).then(() =&gt; {
				console.log(&quot;done 1&quot;);
			})

			setTimeout(() =&gt; {
				browserWindow2.webContents.printToPDF({
				}).then(() =&gt; {
					console.log(&quot;done 2&quot;);
				})
			}, 2000);
		}, 2000);
	});
}
electron.app.on(&quot;ready&quot;, () =&gt; {
	init();
});"><pre class="notranslate"><code class="notranslate">const electron = require("electron");
function init() {
	let browserWindow3 = new electron.BrowserWindow({
		show: true,
		x: 500,
		y: 100,
		width: 900,
		height: 900,
		webPreferences: {
			partition: "persist:test1"
		}
	});
	let browserWindow2 = new electron.BrowserWindow({
		show: true,
		x: 500,
		y: 100,
		width: 900,
		height: 900,
		webPreferences: {
			partition: "persist:test2"
		}
	});
	browserWindow2.webContents.loadURL("http://www.google.com")
	browserWindow3.webContents.loadURL("http://localhost:9000/index.html").then(() =&gt; {
		setTimeout(() =&gt; {
			console.log("calling print to pdf");

			// Comment out this one to make the other one work
			browserWindow3.webContents.printToPDF({
			}).then(() =&gt; {
				console.log("done 1");
			})

			setTimeout(() =&gt; {
				browserWindow2.webContents.printToPDF({
				}).then(() =&gt; {
					console.log("done 2");
				})
			}, 2000);
		}, 2000);
	});
}
electron.app.on("ready", () =&gt; {
	init();
});
</code></pre></div>
<p dir="auto"><strong>index.html</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
    &lt;iframe src=&quot;http://www.orf.at&quot;/&gt;
&lt;/body&gt;
&lt;script&gt;
&lt;/script&gt;
&lt;/html&gt;"><pre class="notranslate"><code class="notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
    &lt;iframe src="http://www.orf.at"/&gt;
&lt;/body&gt;
&lt;script&gt;
&lt;/script&gt;
&lt;/html&gt;
</code></pre></div>