I've created a PDF with dynamic content that runs over at least four pages. I've already set up my PDF Output to reprint the column headers on each page. However, from the second page onwards, the content should be printed in a different location compared to the first page.
How do I do that?
You can place the content in another location on any additional pages by replacing the existing PDF Output with a two-page PDF Output.
Place the components (the PDF Output Table containing the column headers, and the PDF Output Table containing the data) on the first page. Then:
- Set the Replication Strategy = Not Replicated for the first page
- Set the Replication Strategy = Not Replicated on the PDF Output Table containing the data
- Add a Name to the PDF Output Table containing the data (such as Name="TableData")
To create subsequent pages, follow the steps below:
- Copy and paste the column headers and data from the first page onto the second page
- Set Replication Strategy=Always Replicated
- For the PDF Output Table containing the data, set the Replication Strategy = Replicated
- Rearrange the column headers and data components into the layout you require
- Add a Name to the PDF Output Table containing the data (such as Name="TableData")
- Go to the first page, and select the PDF Output Table containing the data. Set the Next Field ID="TableData (page 2)".
This final step connects the two data-containing components.
Other components also required on the second and subsequent pages can be left on the first page, but make sure to set Copy="On All Pages". This avoids you having to redefine and rearrange those components on additional pages.
Note: If you don't have enough data for a second page, add a visibility expression on the second page to prevent the rendering of unnecessary pages.