Need a help to solve below logic and also wanted to understand logic or concept behind it.
Take input of n files. Render a PDF output such that each page satisfies the following requirements:-
(i) Each page should contain only a particular file’s data.
(ii) Each page should contain a maximum of 7 lines of data.
Example:-
File 1- No. of rows = 5
File 2 – No. of rows = 10
Files 3- No. of rows = 15
Output
Page1- 5 lines of file 1
Page2- 7 lines of file 2
Page3- 3 lines of file 2
Page4- 7 lines of file 3
Page5- 7 lines of file 3
Page6- 1 line of file 3
Ensure that the solution is dynamic enough to work on any number of files containing any no. of rows.