You can try below steps to make it work
1. Collect the data and split it into logical groups that fit within one page. Use collections to organize the data for each page.
ClearCollect(
Page1Data,
FirstN(MyDataSource, 10)
);
ClearCollect(
Page2Data,
LastN(MyDataSource, CountRows(MyDataSource) - 10)
);
2. Create separate screens or containers for each page. Add labels, galleries, or other controls to display the data. Bind the first container to Page1Data and the second container to Page2Data.
3. On the first container, set the Items property to Page1Data.
Items = Page1Data
4. On the second container, set the Items property to Page2Data.
Items = Page2Data
5. Design each container or screen to fit the required page layout, ensuring proper alignment and spacing.
6. If using HTMLText for advanced formatting, include page-break CSS for controlling pagination.
7. When generating the PDF, use the Export or Generate function based on the pages or HTMLText you’ve created.
PDFControl.PDFExport()
Test the layout by generating the PDF to ensure the data stays within its designated pages. Adjust item counts or container heights as needed.