Print x and y scroll content in div direction

My problem is that

  • I want to print content inside scroll in horizontal and vertical directions

enter image description here

<button class="printtable">Print</button>
<div id="applicationtableDiv">
<table>
<!-- table content -->
</table>
</div>
 <script type="text/ecmascript" src="<?php echo base_url() ?>js/print.js"></script>
<script>
jQuery(document).ready(function($) {
    $('body').on('click', '.printtable', function(event) {
                event.preventDefault();

                $('#applicationtableDiv>table').print();
              });
});
</script>

I use this plugin click here

This plugin works for me, but I want to print the contents inside scroll x and y

Printing Records enter image description here

+4
source share
1 answer

To create a scroll bar for your table, simply wrap it inside with a divstyle overflow:auto:

<div style="overflow:auto">
     <!-- your table goes here -->
</div>

What all.

0
source

Source: https://habr.com/ru/post/1611768/


All Articles