Custom Print Using Tcpdf

Hello everyone :)

I want to create a invoice like image in attachments

But, my problem is I can’t create the default cell in the table. When data is added the cell is added too. I want to create the default cell, for example number max cell is 5 :

When data is 3, then the blank cell is 2

When data is 4, then the blank cell is 1

Can anyone help me?