jsPDF-AutoTable icon indicating copy to clipboard operation
jsPDF-AutoTable copied to clipboard

Infinite loop when using horizontalPageBreakRepeat

Open rarysson opened this issue 4 years ago • 1 comments

Currently if you use try to use horizontalPageBreakRepeat option with a very long column, it will cause an infinite loop and will break the user browser.

The MCVE: https://jsfiddle.net/scorpion147/oenmqjy7/5/

I don't know exactly what is causing the issue, but I know it's something on the loop inside the function calculateAllColumnsCanFitInPage located on tablePrinter.ts

rarysson avatar Oct 24 '21 22:10 rarysson

I managed to get around this issue by setting column style by limiting the width.

For example: clumnStyles: { super_long_string_of_text: { cellWidth: 100 } }

iiminov avatar Jan 25 '22 10:01 iiminov

Fixed in v3.7.0

mmghv avatar Oct 10 '23 17:10 mmghv