数据表在标题的打印视图中显示“ about:blank”

时间:2019-12-30 12:58:27

标签: javascript jquery angularjs datatable

我正在使用angularJS数据表,在打印时,如果我们执行“打印到pdf”并保存pdf文件,那么它将在pdf页面的右上方显示“ about:blank”。它不会在Chrome中发生。该问题仅在Firefox上仍然存在。 我已经编写了以下代码:

$scope.vm = {};
$scope.vm.dtInstance = {};
$scope.vm.dtOptions = DTOptionsBuilder.newOptions()
    .withOption('order', [0, 'asc'])
    .withOption('lengthChange', false)
    .withDOM('Blrtip')
    .withOption('paging', false)
    .withOption('language', {zeroRecords: 'No data available'})
    .withButtons([{
        extend: 'excelHtml5',
        filename: "Accounting Entries Sent To Rak Bank_" + todayDate + " " + time,
        text: "<i class='fa fa-file-excel-o'></i>  Excel",
        title: " Accounting:Sent To Rak Bank ",
        exportOptions: {
            columns: [0, 2, 3, 4, 5, 6, 7, 8, 9, 10],
        },
        exportData: {decodeEntities: true}
    },
        {
            extend: 'print',
            text: "<i class='fa fa-print'></i>  Print",
            title: "Accounting: Sent to Rak Bank",
            pageSize: 'Statement',
        }
    ]);

attached image is the screenshot of the issue

请指导我。我将非常感谢您。谢谢

0 个答案:

没有答案