Need help
I need to load PDF into iframe
while clicking and then call print dialog on it.
I have such code:
$('.print').click(function () {
var iframe = '<iframe src="test.pdf" id="print-iframe" name="print-iframe"></iframe>';
$('body').append(iframe);
window.frames["print-iframe"].focus();
window.frames["print-iframe"].print();
});
It works perfectly in Chrome. But in Firefox I have such an error:
Error: Permission denied to access property 'print'
.
How can I work around it? Thanks!