The error you are dealing with is related to cross-domain protection and policies of the same origin.
In your case, you can print the cross-domain iframe if you embed this iframe in another local iframe, which we can call the iframe proxy.
Since the proxy iframe is local and has the same origin, you can print it without any problems, as well as print the cross-domain iframe.
The following is an example:
index.html (container)
$(function() { var url = 'proxy.html';
proxy.html (proxy)
<body> <iframe src="http://ANOTHER_DOMAIN/PDF_NAME.pdf"></iframe> </body>
With this solution, you no longer have cross-domain access issues, and you can use the print () function. The only thing you need to deal with is to transfer the PDF URL from the container to the proxy server and determine when the iframe with the PDF file is really loaded, but it depends on the solution / languages you use.
Hideo
source share