I have a big ag-grid looks like below
Somehow I should get PDF export of this and being able to print (both A4 paper size).I've reviewed AG-Grid documentation to find something useful here what I came up with below
onBtPrinterFriendly() {
var eGridDiv = document.querySelector('#myGrid');
eGridDiv.style.width = '';
eGridDiv.style.height = '';
this.gridApi.setDomLayout('print');
print();
}
onBtNormal() {
var eGridDiv = document.querySelector('#myGrid');
eGridDiv.style.width = '400px';
eGridDiv.style.height = '200px';
this.gridApi.setDomLayout(null);
}
These two methods can change grid size to print on desired format.But I can't make my grid smaller diagonally to fit paper size.It justs crops the right side of my grid so looks like this
Doesn't matter how small that would be ,just I wanna put it compeletely A4 paper(vertically).Isn't there anyway to achieve this?I'm also thinking about making a simple HTML table versiton without margins and paddings to fit into paper but that would be too much work so looking for better and easier way if exists.
Plunker example: https://plnkr.co/edit/rVPswsaknukOkhf5
question from:
https://stackoverflow.com/questions/66045279/isnt-there-anyway-to-print-any-ag-grid-size-compeletely-fit-into-a4-paper 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…