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.

Currently available in test environments only!

We are currently in a feedback-gathering phase regarding the Configurable Joins Document query base. As a result, this base is available only in test environments.

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. Locate the Joins section at the bottom of the query summary page and click Join. An Insert Query Part popup appears.

new_cjs_doc_export_query_whole_ui.png

2. In the Joins section, under the Document category, select Application.

3. Click Continue. And Edit Part popup appears to confirm the join.

Document Application Join

4. Click Save. The new join appears on the query summary.

Edit Part Application Join

5. In the Exports section, next to the Export button, select the subquery button. An Edit Part popup appears.

 

Subquery Button

6. Set the following configurations:

    • Name: pdf:xml
    • Output: XML
    • Node: batch

7. In the Exports area, click the Export button. An Insert Query Part popup appears.

Edit Part Subquery Export

8. In the Direct Exports section, under the Application category, select GUID.

9. Click Continue. The export now appears on the Edit Part popup.

GUID Export Selected

10. Hover over the Application GUID export and select the edit (pencil) icon. An Edit Part popup appears.

Edit Export Name

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

Rename Export

12. In the Exports area, to the right of the Export and subquery export buttons, click the Literal button. An Edit Part popup appears.

Literal Button

13. Set the following values:

    • Name: @mode
    • Literal: stream

14. Click Save. The literal appears on the Edit Part popup.

Add Literal

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

 

Export Button

16. In the Direct Exports section, under the Document category, select XML.

17. Click Continue. The export now appears on the Edit Part popup.

XML Export Selected

18. Hover over the Document XML export and select the edit (pencil) icon. An Edit Part popup appears.

Edit XML Export

19. Change the Name value to "node()" and click Save. The renamed export appears on the Edit Part popup.

 

Rename XML Export

20. Click Save to complete and save the query.

Saving Subquery Export

 

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

header_nested_subquery_export.png

3. Add the desired datapoints with literal separators as needed for readability.

header_nested_subquery_export_with_datapoints.png

4. Save the @header nested subquery export.

pdfxml_with_header_at_botton.png

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.

pdfxml_reorder.png

pdfxml_export_complete_full_query.png

Was this article helpful?
0 out of 0 found this helpful