I have a Data studio dashboard embeded and I want to add a function to print the dashboard but it seems that for the CORS restrictions it is not possible to do this
is any work around this ? I found this but it doesn't seem to work print a pdf via iframe (cross domain)
I have this
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
// window.print();
$("#printf").get(0).contentWindow.print();
});
});
</script>
</head>
<body>
<iframe width="1000" height="400" id="printf" name="printf" src="https://datastudio.google.com/embed/reporting/0B5FF6JBKbNJxQ1hMRzRiVDlobVU/page/jR7H"></iframe>
<button>Print </button>
</body>
</html>