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

Repeating Mutiple Columns using horizontalPageBreakRepeat.

Open gitsakil09 opened this issue 3 years ago • 7 comments

Is it possible to repeat more than one header columns in every page when the table width exceeds the page width? I haven't found any solution yet. Is there any way to add this feature in future? Something like by providing an array of keys or some other ways.

horizontalPageBreakRepeat: [0,1,2,3] for example.

gitsakil09 avatar Aug 23 '22 11:08 gitsakil09

I think you will be able to accomplish what you want with the horizontalPageBreak option.

simonbengtsson avatar Aug 23 '22 11:08 simonbengtsson

I think you will be able to accomplish what you want with the horizontalPageBreak option.

Thank you for your reply. I have set the horizontalPageBreak: true. I can see the table is breaking and thats ok. What I want is the repetition of multiple header columns. By setting horizontalPageBreakRepeat: 0, I can see the first column is repeating but I want columns first, second and third repeated. I hope you have understood me. If there is any snippets I would be grateful. Thanks.

gitsakil09 avatar Aug 23 '22 17:08 gitsakil09

This issue will soon be closed since issues in this project are mainly meant to be bugs or feature requests. Questions are directed to stackoverflow.

github-actions[bot] avatar Aug 31 '22 04:08 github-actions[bot]

Any update yet?

gitsakil09 avatar Sep 05 '22 12:09 gitsakil09

Got it. Marked it as a feature request now. Let me know if you start work on it. It could be somewhat complex so feel free to send an implementation plan for review beforehand.

simonbengtsson avatar Sep 05 '22 12:09 simonbengtsson

@simonbengtsson thank you so much for spending time on it. Is it possible to make horizontalPageBreakRepeat an array of column datakey. Something like horizontalPageBreakRepeat: [0,1,2] or horizontalPageBreakRepeat: ['id','name','email']. This is just an idea you know. Sorry for bothering.

gitsakil09 avatar Sep 10 '22 18:09 gitsakil09

Make sense to me!

simonbengtsson avatar Sep 10 '22 19:09 simonbengtsson

Any updates on this?

Edit: @simonbengtsson Created PR.

ecosse3 avatar Aug 17 '23 10:08 ecosse3