Print orientation selection option in print preview is disappearing. How to fix it?

Print orientation selection option in print preview is disappearing. How to fix it?

VIDYADEEPVIDYADEEP Posts: 1Questions: 1Answers: 0

I need to take print of a Report containing Datatable. When I click the print button in DataTable the print orientation changing option will appear when the print preview page is loading . But that option will disappear after the print preview is completely loaded.How can I fix this issue?

The jquery code used for print button in DataTable is given below:

     var printButton = $@"
            {{
                text: '<i class=""fa fa-print"" style=""font-size: 15px; ""></i>',
                className: 'print',
                extend: 'print',
                footer: true,
                title: $('.page-title').html(),
                exportOptions:
                {{
                    columns: ':visible'
                }},
                customize: function(win) {{
                    $(win.document.body)
                        .prepend(
                             '<div style=""display: flex; flex-direction: column; align-items: left;"">' +
                '<div style=""font-size: 30px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;"">' + '{abc.Name}' + '</div>' +
                '<div style=""font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-left: 10px;"">' + '{abc.Address1}' + '</div>' +
                '<div style=""font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-left: 10px;"">' + '{abc.Address2}' + '</div>' +
                '<div style=""font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-left: 10px;"">' + '{abc.Address3}' + '</div>' +
                '</div>'
                        );
                    $(win.document.body).find('.page-title')
                        .css('font-size', '20px');
                    $(win.document.body).find('table')
                        .addClass('compact')
                        .css('font-size', 'absolute');
                }}
                    }}
        ";

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Sounds like a browser issue to me - we don't control the print dialogue, that's the browser / OS. What browser are you using? Have you tried another one?

    Allan

Sign In or Register to comment.