JSPDF javascript 无法使用 Tableau
JSPDF javascript not working with Tableau
我正在尝试打印包含画面仪表板的 pdf 页面。所以我正在使用 JS PDF 库来这样做。尽管问题在于它会打印除 Tableau 仪表板(在 iframe 内)之外的所有内容。
如果可行,请问可以吗?
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(html 代码):
<iframe name="iframe" id="youriframeins" src="tableau_sharedlink" height="1000px" width="100%"></iframe>
很遗憾,目前不支持此功能。您可以在这里为这个想法投票:https://community.tableau.com/ideas/1348
我正在尝试打印包含画面仪表板的 pdf 页面。所以我正在使用 JS PDF 库来这样做。尽管问题在于它会打印除 Tableau 仪表板(在 iframe 内)之外的所有内容。
如果可行,请问可以吗?
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(html 代码):
<iframe name="iframe" id="youriframeins" src="tableau_sharedlink" height="1000px" width="100%"></iframe>
很遗憾,目前不支持此功能。您可以在这里为这个想法投票:https://community.tableau.com/ideas/1348