简体   繁体   English

JSPDF javascript 不适用于 Tableau

[英]JSPDF javascript not working with Tableau

I am trying to print a page in pdf that includes a tableau dashboard.我正在尝试在 pdf 中打印一个页面,其中包括一个画面仪表板。 So I am using the JS PDF library to do so.所以我使用 JS PDF 库来做到这一点。 Though the issue is it prints everything except for the Tableau dashboard (within an iframe).尽管问题在于它会打印除 Tableau 仪表板(在 iframe 内)之外的所有内容。

Could you please let me if this works?如果这行得通,你能告诉我吗?

Javascript code below: Javascript 代码如下:

 function loadpdf2(){        
            if ($(document).width() > $(document).height()) {
            var pdf = new jsPDF('l', 'pt', [$(document).width(), $(document).height()]); //
            }
            else {
                var pdf = new jsPDF('p', 'pt', [$(document).height(), $(document).width()]); //
            }
            pdf.addHTML(document.body, function() {
                pdf.save('webtool.pdf');
            });
        }

Tableau iframe below (html code): Tableau iframe 下面(html 代码):

 <iframe name="iframe" id="youriframeins" src="tableau_sharedlink" height="1000px" width="100%"></iframe>

unfortunately, this functionality is not currently supported.不幸的是,目前不支持此功能。 You can vote for the idea here: https://community.tableau.com/ideas/1348您可以在这里为这个想法投票: https://community.tableau.com/ideas/1348

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM