Repeating pages allow you to generate multiple instances of a specific page within a PDF document based on dynamic data. This feature is ideal for creating documents like invoices, reports, or catalogs where certain pages need to be duplicated when data overflows a limited number of empty fields.
To set up repeating pages, define a placeholder in your PDF template where the repeated content should appear. Use Anvil’s templating syntax to specify the data source for the repetition. The API will automatically generate the necessary number of pages by populating the template with each item from your data array.
Yes, each repeating page can be customized based on the data provided. You can use conditional logic and dynamic content placeholders within your template to vary the content, layout, and styling of each page according to the specific data it represents.
Anvil’s PDF Generation API supports various data formats, including JSON and CSV. You can structure your data as an array of objects, where each object contains the information needed for a single instance of the repeating page. This flexibility allows you to integrate data from different sources seamlessly.
When generating PDFs with a large number of repeating pages, performance can be affected by the volume of data and the complexity of the template. To optimize performance, ensure that your data is efficiently structured and your templates are streamlined. Anvil’s API is designed to handle high volumes, but it's recommended to test your setup to identify and address any potential bottlenecks.