Hi.
In this video, I'll show you my solution to the exercise.
And we've been working with this exercise since yesterday.
And all I added today were these lines of code.
So six lines of code I added for this exercise.
So if I run this code, it will produce this output, that PDF file.
And what my code does here is that it opens each of the files.
You see, we are inside the for loop.
So we open each of the files using this with context manager with that open function, and we read the
contents of the file using the read method.
So content will contain a string.
Then we set the font for the next cell we want to add, and then we use a multi cell because this is
multi line texts.
It expands across multiple lines.
So the width of that is going to be zero, which means that the multi cell will expand the entire width
of the PDF document.
So from here up to the end of the PDF document and the height, I place it as six.
So that is the height of the height of the cell.
Now.
This is one cell of the multi cell object that's a second cell and so on.
So the height of each cell of this cell, for example, is six, and the size of the text is 12.
So you perhaps have different values and that's fine.
And then we have the text argument which contains the contents variable as a value.
So the text will be written in this multi cell.
And same goes for all the pages.
So that is my solution.
You're doing a great job.
So let's do some more video.
See you next.