Adding a Header or Footer to Documents in a Document Export Query
Sometimes a third-party system requires document metadata to be included on the document itself (as opposed to being in an associated index file). To accomplish this, the required information must be added to the pdf:xml export in the Document Export query. Using the Configurable Joins - Document base this can be accomplished by creating the pdf:xml export using a Subquery Export.
Building the Standard Parts of the pdf:xml Subquery Export
Start by recreating the standard portions of the pdf:xml export.
Important!
These steps must be followed exactly for the Document Export query to function as intended.
1. In the Exports section, next to the Export button, select the subquery button. An Edit Part popup appears.
|
|
2. Set the following configurations:
-
- Name: pdf:xml
- Output: XML
- Node: batch
3. In the Exports area, click the Export button. An Insert Query Part popup appears.
|
|
4. In the Direct Exports section, under the Document category, select Record GUID.
5. Click Continue. The export now appears on the Edit Part popup.
|

|
6. Hover over the Document Record GUID export and select the edit (pencil) icon. An Edit Part popup appears.
|

|
7. Change the Name value to "@id" and click Save. The export is renamed on the Edit Part popup.
|

|
8. In the Exports area, to the right of the Export and subquery export buttons, click the Literal button. An Edit Part popup appears.
|
|
9. Set the following values:
-
- Name: @mode
- Literal: stream
10. Click Save. The literal appears on the Edit Part popup.
|
|
11. In the Exports section, click the Export button. An Insert Query Part popup appears. |
 |
12. In the Direct Exports section, under the Document category, select Scope.
13. Click Continue. The export now appears on the Edit Part popup.
|

|
14. Hover over the Document Scope export and select the edit (pencil) icon. An Edit Part popup appears. |

|
15. Change the Name value to "@scope" and click Save. The renamed export appears on the Edit Part popup. |

|
16. In the Exports section, click the Export button. An Insert Query Part popup appears.
|

|
17. In the Direct Exports section, under the Document category, select XML.
18. Click Continue. The export now appears on the Edit Part popup.
|
|
19. Hover over the Document XML export and select the edit (pencil) icon. An Edit Part popup appears.
|

|
20. Change the Name value to "node()" and click Save. The renamed export appears on the Edit Part popup.
|
|
21. Click Save to complete and save the query.
|

|
Add an @header Attribute with Desired Metadata
Before adding the @header attribute to your pdf:xml export, consider which datapoints need to be included and ensure that the joins to access these datapoints are configured appropriately. Refer to our Configurable Joins - Joining documentation as needed.
1. Open the pdf:xml Subquery Export created above.
2. Add a nested Subquery Export by selecting the Subquery icon next to the Export button
-
- Name: @header
- Output: Concatenate
|
|
3. Add the desired datapoints with literal separators as needed for readability.
|
|
4. Save the @header nested subquery export. |
|
5. Reorder the exports within the pdf:xml subquery export so that the node() export is at the bottom.
6. Save the pdf:xml subquery export.
|
|