Dynamic PDF Form Page Generation

Hi Everyone,

I’m brand new to DHIS2 and I’ve only recently been tinkering with it so forgive me if this has already been asked before (checked but didn’t find anything as far as I’m aware).
I’m currently designing a custom Data Set through HTML and so far so good. The form renders properly and it’s able to pull and populate imported data (done via CSV) to a printable PDF form.

However, I’d like to know if it is possible to have the PDF form dynamically generate printable pages strictly based on quantity of the imported data so as to avoid any extra blank pages that do not contain any data.

Your assistance will greatly be appreciated.

Thank you